aboutsummaryrefslogtreecommitdiff
path: root/vimrc-common
diff options
context:
space:
mode:
authorMax Christian Pohle2018-10-29 18:02:40 +0100
committerMax Christian Pohle2018-10-29 18:02:40 +0100
commiteb2e7959987ebc405c7a03060f259655e13f01d0 (patch)
tree773e2b638c135fb9861567585f4ce82db252df98 /vimrc-common
parent6284983fedcbdc54874d6e657047994b292be480 (diff)
downloadvim-karlmarks-eb2e7959987ebc405c7a03060f259655e13f01d0.tar.bz2
vim-karlmarks-eb2e7959987ebc405c7a03060f259655e13f01d0.zip
Further cleaning finally done
Diffstat (limited to 'vimrc-common')
-rw-r--r--vimrc-common20
1 files changed, 8 insertions, 12 deletions
diff --git a/vimrc-common b/vimrc-common
index 00c7996..7eb499f 100644
--- a/vimrc-common
+++ b/vimrc-common
@@ -119,8 +119,8 @@ if has('nvim') " Neovim?
119endif 119endif
120 120
121set pumheight=8 | " Determines the maximum number of items to show in the pop-up menu for 121set pumheight=8 | " Determines the maximum number of items to show in the pop-up menu for
122set scrolljump=5 | " how many lines get scrolled into view when cursor reaches the screens edge 122set scrolljump=4 | " how many lines get scrolled into view when cursor reaches the screens edge
123set scrolloff=0 | " keeps cursor centered 123set scrolloff=4 | " keeps cursor centered
124set shiftround | " indent/un-indent snaps to multiple of shiftwidths 124set shiftround | " indent/un-indent snaps to multiple of shiftwidths
125set writedelay=0 125set writedelay=0
126 126
@@ -225,10 +225,6 @@ if has("autocmd")
225 autocmd FileType python setlocal keywordprg=pydoc 225 autocmd FileType python setlocal keywordprg=pydoc
226 autocmd FileType vim setlocal keywordprg=:help |. 226 autocmd FileType vim setlocal keywordprg=:help |.
227 autocmd FileType conf setlocal isfname-== 227 autocmd FileType conf setlocal isfname-==
228 autocmd FileType c,cpp setlocal equalprg=clang-format
229 autocmd FileType c,cpp setlocal breakat-=-
230 autocmd FileType c,cpp setlocal keywordprg=man\ 3
231 autocmd FileType c,cpp map <buffer> = :pyf /usr/share/clang/clang-format.py<CR>
232 autocmd Filetype css command! CSSsort :g/{/+1;/}/-1 sort 228 autocmd Filetype css command! CSSsort :g/{/+1;/}/-1 sort
233 autocmd Filetype html,markdown,xml iabbrev </ </<C-X><C-O> 229 autocmd Filetype html,markdown,xml iabbrev </ </<C-X><C-O>
234 230
@@ -259,6 +255,7 @@ augroup CUSTOM_COMMANDS
259 \ 'text': '='.printf('%*s, % 3d: %s [%s]', winwidth(0) / 2, '', v:val.bufnr, v:val.name, getbufvar(v:val.bufnr, '&buftype')), 255 \ 'text': '='.printf('%*s, % 3d: %s [%s]', winwidth(0) / 2, '', v:val.bufnr, v:val.name, getbufvar(v:val.bufnr, '&buftype')),
260 \ 'pattern': 'not loaded'} 256 \ 'pattern': 'not loaded'}
261 \ ")) 257 \ "))
258 command! Qfls call setqflist([],'r',{ 'title':'listed buffers', 'items':map(getbufinfo({"buflisted":1}), '{"bufnr":get(v:val,"bufnr"),"lnum":get(v:val,"lnum"),"module":printf("%-*s",winwidth(0)-4,fnamemodify(get(v:val,"name"),":t"))}') })
262 command! Ctoggle 259 command! Ctoggle
263 \ if(get(getqflist({'winid':1}), 'winid') == win_getid())|cclose|else|botright copen|endif 260 \ if(get(getqflist({'winid':1}), 'winid') == win_getid())|cclose|else|botright copen|endif
264 command! Ltoggle 261 command! Ltoggle
@@ -308,7 +305,8 @@ augroup KEYBOARD_MAPPING
308 " exec current line as a command, insert output of command (from: https://youtu.be/MquaityA1SM?t=35m45s) 305 " exec current line as a command, insert output of command (from: https://youtu.be/MquaityA1SM?t=35m45s)
309 nnoremap <leader>Q !!$SHELL<CR> 306 nnoremap <leader>Q !!$SHELL<CR>
310 " google the word under the cursor 307 " google the word under the cursor
311 nnoremap <leader>G :execute ":!xdg-open https://google.de/search?q=".expand("<cword>") 308 nnoremap <leader>g :execute ":!xdg-open https://google.de/search?q=".expand("<cword>")<CR>
309 nnoremap <leader>u :execute ":!xdg-open ".expand("<cWORD>")<CR>
312 " display highlight group under the cursor 310 " display highlight group under the cursor
313 nnoremap <leader>h :echo map(synstack(line('.'), col('.')), 'synIDattr(v:val, "name")')<CR> 311 nnoremap <leader>h :echo map(synstack(line('.'), col('.')), 'synIDattr(v:val, "name")')<CR>
314 312
@@ -319,13 +317,11 @@ augroup KEYBOARD_MAPPING
319 " inoremap <C-@> <C-Space> 317 " inoremap <C-@> <C-Space>
320 318
321 " Bind CTRL+Backspace to vim's version (CTRL+W) in " <CR> insert mode (only works with gvim) 319 " Bind CTRL+Backspace to vim's version (CTRL+W) in " <CR> insert mode (only works with gvim)
322 inoremap 320 inoremap <C-Backspace> <C-W>
323 \ <C-Backspace>
324 \ <C-W>
325 321
326 " INDENTATION: allows un-indenting a selected block and keeps selection 322 " INDENTATION: allows un-indenting a selected block and keeps selection
327 vnoremap < <gv 323 vnoremap < <gv
328 vnoremap > >gv 324 vnoremap > >gv
329 325
330 " make shift-home select to the beginning of the line 326 " make shift-home select to the beginning of the line
331 nnoremap <s-home> v^ 327 nnoremap <s-home> v^
..