cc0b45881ef9

Clean up less mappings.
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Fri, 02 Sep 2011 15:49:39 -0400
parents e2fb3a033794
children 1e89b58fd3b5
branches/tags (none)
files vim/.vimrc

Changes

--- a/vim/.vimrc	Fri Sep 02 10:18:01 2011 -0400
+++ b/vim/.vimrc	Fri Sep 02 15:49:39 2011 -0400
@@ -328,15 +328,8 @@
 
 au BufNewFile,BufRead *.less setlocal filetype=less
 
-au BufNewFile,BufRead *.css  setlocal foldmethod=marker
-au BufNewFile,BufRead *.less setlocal foldmethod=marker
-
-au BufNewFile,BufRead *.css  setlocal foldmarker={,}
-au BufNewFile,BufRead *.less setlocal foldmarker={,}
-
-" Use cc to change lines without borking the indentation.
-au BufNewFile,BufRead *.css  nnoremap <buffer> cc ddko
-au BufNewFile,BufRead *.less nnoremap <buffer> cc ddko
+au BufNewFile,BufRead *.less,*.css setlocal foldmethod=marker
+au BufNewFile,BufRead *.less,*.css setlocal foldmarker={,}
 
 " Use <leader>S to sort properties.  Turns this:
 "
@@ -357,14 +350,11 @@
 "
 "         ...
 "     }
-"
-au BufNewFile,BufRead *.css  nnoremap <buffer> <localleader>S ?{<CR>jV/\v^\s*\}?$<CR>k:sort<CR>:noh<CR>
-au BufNewFile,BufRead *.less nnoremap <buffer> <localleader>S ?{<CR>jV/\v^\s*\}?$<CR>k:sort<CR>:noh<CR>
+au BufNewFile,BufRead *.less,*.css nnoremap <buffer> <localleader>S ?{<CR>jV/\v^\s*\}?$<CR>k:sort<CR>:noh<CR>
 
 " Make {<cr> insert a pair of brackets in such a way that the cursor is correctly
 " positioned inside of them AND the following code doesn't get unfolded.
-au BufNewFile,BufRead *.css  inoremap <buffer> {<cr> {}<left><cr>.<cr><esc>kA<bs><space><space><space><space>
-au BufNewFile,BufRead *.less inoremap <buffer> {<cr> {}<left><cr>.<cr><esc>kA<bs><space><space><space><space>
+au BufNewFile,BufRead *.less,*.css inoremap <buffer> {<cr> {}<left><cr><space><space><space><space>.<cr><esc>kA<bs>
 
 " }}}
 " Django {{{