diff options
author | Johannes Stolp <jstolp@vgfr65cs1.internal.synopsys.com> | 2016-07-13 22:46:45 +0200 |
---|---|---|
committer | Johannes Stolp <jstolp@vgfr65cs1.internal.synopsys.com> | 2016-07-13 22:46:45 +0200 |
commit | 88db1685aded1d4787ce5b81fe82658a6be9274d (patch) | |
tree | ffb1a79c845ecb7c1ab762d16722d1d711b46ad6 /.vim/vimrc_files | |
parent | c6d1aab0a4f24a9f9b18b55ee452fe98b5c91ab3 (diff) | |
download | dotfiles-88db1685aded1d4787ce5b81fe82658a6be9274d.tar.gz dotfiles-88db1685aded1d4787ce5b81fe82658a6be9274d.zip |
enabled foldmethod \'marker\' for vim
added Ctrl-f functions in vim to create fold blocks
Diffstat (limited to '.vim/vimrc_files')
-rw-r--r-- | .vim/vimrc_files/functions.vim | 4 | ||||
-rw-r--r-- | .vim/vimrc_files/keymaps.vim | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/.vim/vimrc_files/functions.vim b/.vim/vimrc_files/functions.vim index 4ab280d..9f2a1fd 100644 --- a/.vim/vimrc_files/functions.vim +++ b/.vim/vimrc_files/functions.vim @@ -2,14 +2,14 @@ " author: johannst " Split Window and scroll down -fu! SplitScroll() +function! SplitScroll() :wincmd v :wincmd w execute "normal! \<C-d>" :set scrollbind :wincmd w :set scrollbind -endfu +endfunc " toggle relative line number mode function! ToggleRelativeNumber() diff --git a/.vim/vimrc_files/keymaps.vim b/.vim/vimrc_files/keymaps.vim index f7cb026..0469920 100644 --- a/.vim/vimrc_files/keymaps.vim +++ b/.vim/vimrc_files/keymaps.vim @@ -83,6 +83,10 @@ vnoremap <C-e> $ " Shortcut to toggle relative numbering mode nnoremap <c-n> :call ToggleRelativeNumber()<CR> +" add a marker fold snippet (for C/C++) +vnoremap <C-f> VV'<O//{{{ <Esc>'>o//}}}<Esc>'<<ESC><Up>A +nnoremap <C-f> o//{{{ <Esc>o//}}}<Esc><Up>A +imap <C-f> <ESC><C-f> " Open BufferExplorer nnoremap <C-b> :call BufExplorer()<CR> @@ -90,9 +94,5 @@ nnoremap <C-b> :call BufExplorer()<CR> " Toggle Tagbar nnoremap <leader>t :TagbarToggle<CR> - -" invoke grep and print output into current buffer -nnoremap <C-g> :read !grep -nI - -" substituce selection +" substitute selection vnoremap <C-r> "hy:%s/<C-r>h//gc<left><left><left> |