summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.vim/vimrc_files/functions.vim4
-rw-r--r--.vim/vimrc_files/keymaps.vim10
-rw-r--r--.vimrc3
3 files changed, 10 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>
diff --git a/.vimrc b/.vimrc
index 100c241..70c087c 100644
--- a/.vimrc
+++ b/.vimrc
@@ -43,6 +43,9 @@ set shiftwidth=4 " but an indent level is 2 spaces wide.
set softtabstop=4 " <BS> over an autoindent deletes both spaces.
set shiftround " rounds indent to a multiple of shiftwidth
set backspace=2
+set formatoptions-=cro " disable auto-comment
+
+set foldmethod=marker " set fold method
set hidden " do not unload abandoned buffers
set nowrap " don't wrap text