aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/shortcuts.txt7
-rw-r--r--vimrc23
2 files changed, 26 insertions, 4 deletions
diff --git a/doc/shortcuts.txt b/doc/shortcuts.txt
index fd21674..7b5b78b 100644
--- a/doc/shortcuts.txt
+++ b/doc/shortcuts.txt
@@ -66,7 +66,8 @@ notice, that registers get used for both: macro recordings and copying text
66 66
67[marker] 67[marker]
68ma = set marker a-z (a in this case) 68ma = set marker a-z (a in this case)
69'a = go to marker a 69`a = go to marker a (line & column)
70'a = go to marker a (line, first non blank), same as `a^
70 71
71 72
72[hotkeys] 73[hotkeys]
@@ -124,6 +125,10 @@ gn = makes the directory under the cursor the root directory
124a = toggles display of hidden files 125a = toggles display of hidden files
125 126
126 127
128[filetype:css]
129viB:sort = sort inner block by name
130
131
127[vim modeline] 132[vim modeline]
128filetype can have multiple values, like python.django 133filetype can have multiple values, like python.django
129The last line can be a mode line, which holds settings like tab width: 134The last line can be a mode line, which holds settings like tab width:
diff --git a/vimrc b/vimrc
index 48f8435..2217daa 100644
--- a/vimrc
+++ b/vimrc
@@ -209,6 +209,7 @@ inoremap <C-Space> <C-x><C-o>
209vnoremap < <gv| " allows deindenting a selected block and keeps selection 209vnoremap < <gv| " allows deindenting a selected block and keeps selection
210vnoremap > >gv| " allows indenting a selected block and keeps selection 210vnoremap > >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)
213inoremap 214inoremap
214 \ <C-Backspace> 215 \ <C-Backspace>
@@ -257,6 +258,7 @@ set nocursorcolumn | " turn visual cursor column off (improves perfor
257set nocursorline | " turn visual cursor line off (improves performance) 258set nocursorline | " turn visual cursor line off (improves performance)
258set nrformats+=alpha | " allows CTRL-A & CTRL-X to increment and decrement letters, not just numbers 259set nrformats+=alpha | " allows CTRL-A & CTRL-X to increment and decrement letters, not just numbers
259set nofoldenable | " disable code folding. I hate code folding 260set nofoldenable | " disable code folding. I hate code folding
261set foldcolumn=4 | " if code folding gets used display it in the clutter bar, where line numbers live
260set relativenumber | " relative line numbers can speed up navigation 262set relativenumber | " relative line numbers can speed up navigation
261set noshowmode | " because we are using some powerline derivat 263set noshowmode | " because we are using some powerline derivat
262set nostartofline | " when scrolling: do not move the cursor to column 1 264set 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>
435endif 453endif
436 454
437 455nnoremap <leader>r :syntax sync fromstart
438
439 456
440" colorscheme base16-embers 457" colorscheme base16-embers
441" colorscheme base16-flat 458" colorscheme base16-flat
..