1. salvator
  2. vimrc

Commits

vrmg  committed 93e0eee

less ciompiler on save

  • Participants
  • Parent commits ebdcf79
  • Branches default

Comments (0)

Files changed (2)

File .netrwhist

-let g:netrw_dirhistmax  =10
-let g:netrw_dirhist_cnt =7
-let g:netrw_dirhist_1='/home/juice/projects/simplesea/settings'
-let g:netrw_dirhist_2='/home/juice/projects/taskzilla/templates/notifications'
-let g:netrw_dirhist_3='/home/juice/projects/taskzilla/tasks'
-let g:netrw_dirhist_4='/home/juice/projects/chubaka/chubaka/templates'
-let g:netrw_dirhist_5='/home/juice/projects/chubaka/chubaka/templates/admin'
-let g:netrw_dirhist_6='/home/juice/projects/django-admintools-bootstrap/admintools_bootstrap/templates/admin_tools'
-let g:netrw_dirhist_7='/home/juice/projects/django-admintools-bootstrap/admintools_bootstrap/templates/admin_tools/menu'

File vimrc

View file
 
 filetype plugin on
 
+function LessToCss()
+  let current_file = shellescape(expand('%:p'))
+  let filename = shellescape(expand('%:r'))
+  let command = "silent !lessc -x " . current_file . " " . filename . ".css"
+  execute command
+endfunction
+
 if has("autocmd")
 
 	au BufNewFile,BufRead *.tt setf tt2html
 
 	au BufNewFile,BufRead *.less set filetype=less
 	
-	autocmd FileType python setlocal textwidth=120 tabstop=8 autoindent spell spelllang=en_us
+	autocmd FileType python setlocal textwidth=120 tabstop=8 autoindent
 	autocmd FileType rst setlocal spell spelllang=en_us
 	autocmd FileType python set omnifunc=pythoncomplete#Complete
 	autocmd FileType javascript set omnifunc=javascriptcomplete#CompleteJS
 	autocmd FileType html set omnifunc=htmlcomplete#CompleteTags
 	autocmd FileType css set omnifunc=csscomplete#CompleteCSS
+
+	autocmd BufWritePost,FileWritePost *.less call LessToCss()
+
 end