diff options
author | Max Christian Pohle | 2017-02-28 22:14:43 +0100 |
---|---|---|
committer | Max Christian Pohle | 2017-02-28 22:14:43 +0100 |
commit | f53a1526417493746d771f6243f30ba62ef7438c (patch) | |
tree | d897f141265c53c5d4f81d5e4df5de501705381d /vimrc | |
parent | 3b7000901a735f880fb5cf70c5d214becfae100d (diff) | |
download | vim-karlmarks-f53a1526417493746d771f6243f30ba62ef7438c.tar.bz2 vim-karlmarks-f53a1526417493746d771f6243f30ba62ef7438c.zip |
improved xml handling
Diffstat (limited to 'vimrc')
-rw-r--r-- | vimrc | 23 |
1 files changed, 20 insertions, 3 deletions
@@ -209,6 +209,7 @@ inoremap <C-Space> <C-x><C-o> | |||
209 | vnoremap < <gv| " allows deindenting a selected block and keeps selection | 209 | vnoremap < <gv| " allows deindenting a selected block and keeps selection |
210 | vnoremap > >gv| " allows indenting a selected block and keeps selection | 210 | vnoremap > >gv| " allows indenting a selected block and keeps selection |
211 | 211 | ||
212 | |||
212 | " Bind CTRL+Backspace to vims version (CTRL+W) in " <CR> insert mode (only works with gvim) | 213 | " Bind CTRL+Backspace to vims version (CTRL+W) in " <CR> insert mode (only works with gvim) |
213 | inoremap | 214 | inoremap |
214 | \ <C-Backspace> | 215 | \ <C-Backspace> |
@@ -257,6 +258,7 @@ set nocursorcolumn | " turn visual cursor column off (improves perfor | |||
257 | set nocursorline | " turn visual cursor line off (improves performance) | 258 | set nocursorline | " turn visual cursor line off (improves performance) |
258 | set nrformats+=alpha | " allows CTRL-A & CTRL-X to increment and decrement letters, not just numbers | 259 | set nrformats+=alpha | " allows CTRL-A & CTRL-X to increment and decrement letters, not just numbers |
259 | set nofoldenable | " disable code folding. I hate code folding | 260 | set nofoldenable | " disable code folding. I hate code folding |
261 | set foldcolumn=4 | " if code folding gets used display it in the clutter bar, where line numbers live | ||
260 | set relativenumber | " relative line numbers can speed up navigation | 262 | set relativenumber | " relative line numbers can speed up navigation |
261 | set noshowmode | " because we are using some powerline derivat | 263 | set noshowmode | " because we are using some powerline derivat |
262 | set nostartofline | " when scrolling: do not move the cursor to column 1 | 264 | set nostartofline | " when scrolling: do not move the cursor to column 1 |
@@ -366,9 +368,25 @@ if has("autocmd") | |||
366 | " hitting K over a keyword shows a help in a buffer. | 368 | " hitting K over a keyword shows a help in a buffer. |
367 | " Here we define the commands used to look those keywords up | 369 | " Here we define the commands used to look those keywords up |
368 | " as per file type... | 370 | " as per file type... |
369 | augroup keyword_lookups | 371 | augroup filetype_specific |
370 | autocmd FileType python setlocal keywordprg=pydoc | 372 | autocmd FileType python setlocal keywordprg=pydoc |
371 | autocmd FileType vim setlocal keywordprg=:help |. | 373 | autocmd FileType vim setlocal keywordprg=:help |. |
374 | autocmd FileType c,cpp setlocal equalprg=clang-format | ||
375 | |||
376 | " keyboard mapping for xml alike languages | ||
377 | " Alt-Up : Move cursor up one tag | ||
378 | " Alt-Down: Move cursor down one tag | ||
379 | " leader-=: tidies currently selected tag and subtags and sorts attributes by name (alphabetically) | ||
380 | autocmd Filetype html,htmldjango,xml | ||
381 | \ :nnoremap | ||
382 | \ <M-Down> | ||
383 | \ :call search('^ *<', 'e')<CR>:nohlsearch<CR>| | ||
384 | \ :nnoremap | ||
385 | \ <M-Up> | ||
386 | \ :call search('^ *<', 'eb')<CR>:nohlsearch<CR>| | ||
387 | \ :nnoremap | ||
388 | \ <leader>= | ||
389 | \ vat:'<,'>!tidy -xml --wrap 0 --sort-attributes alpha 2>/dev/null<CR>vat= | ||
372 | augroup END | 390 | augroup END |
373 | 391 | ||
374 | 392 | ||
@@ -434,8 +452,7 @@ else | |||
434 | nnoremap <leader>t :new +terminal<CR> | 452 | nnoremap <leader>t :new +terminal<CR> |
435 | endif | 453 | endif |
436 | 454 | ||
437 | 455 | nnoremap <leader>r :syntax sync fromstart | |
438 | |||
439 | 456 | ||
440 | " colorscheme base16-embers | 457 | " colorscheme base16-embers |
441 | " colorscheme base16-flat | 458 | " colorscheme base16-flat |