summaryrefslogtreecommitdiff
path: root/.vim/vimrc_files/keymaps.vim
diff options
context:
space:
mode:
authorJohannes Stolp <jstolp@vgfr65cs1.internal.synopsys.com>2016-07-12 20:19:32 +0200
committerJohannes Stolp <jstolp@vgfr65cs1.internal.synopsys.com>2016-07-12 20:19:32 +0200
commit6a2299df8c0c8cb97be883f0e1dd0c8c7cf7a2ff (patch)
treec180153f8ffe3b1109e7f7032d73e2ea8dd32abd /.vim/vimrc_files/keymaps.vim
parent9afd3dbc4c5236bdc2a93d63ebb68d918e03af86 (diff)
downloaddotfiles-6a2299df8c0c8cb97be883f0e1dd0c8c7cf7a2ff.tar.gz
dotfiles-6a2299df8c0c8cb97be883f0e1dd0c8c7cf7a2ff.zip
added tmux config file
added tagbar support for vim
Diffstat (limited to '.vim/vimrc_files/keymaps.vim')
-rw-r--r--.vim/vimrc_files/keymaps.vim49
1 files changed, 28 insertions, 21 deletions
diff --git a/.vim/vimrc_files/keymaps.vim b/.vim/vimrc_files/keymaps.vim
index c5dfaed..f7cb026 100644
--- a/.vim/vimrc_files/keymaps.vim
+++ b/.vim/vimrc_files/keymaps.vim
@@ -4,17 +4,20 @@
" set leader key
let mapleader=","
+" re-source .vimrc
+map <leader>v :source ~/.vimrc<CR>
+
"remap esc button
imap jj <Esc>
" prevent quit accidentlty
-map :q :close
-map :wq :w
-noremap :qq :q
-noremap <leader>d :bd<CR>
+map :q :bd
+map :qa :bd
+map :wq :w<CR>:bd
+noremap <leader>q :q<CR>
" re-adjust indentation
-map <fi> mzgg=G`z
+map <leader>f mzgg=G`z
"let ArrowDisableMessage = "Arrow Keys disabled! Better learn hjkl ;)"
@@ -50,30 +53,31 @@ cnoremap <c-l> <Right>
" navigate between different splits
-map <c-Down> <c-w>j
-map <c-Up> <c-w>k
-map <c-Right> <c-w>l
-map <c-Left> <c-w>h
-map <c-j> <c-w>j
-map <c-k> <c-w>k
-map <c-l> <c-w>l
-map <c-h> <c-w>h
+map <C-Down> <c-w>j
+map <C-Up> <c-w>k
+map <C-Right> <c-w>l
+map <C-Left> <c-w>h
+
+
+" resize splits
+map <C-j> <C-w>5-
+map <C-k> <C-w>5+
+map <C-l> <C-w>5<
+map <C-h> <C-w>5>
" navigate between different buffers
nnoremap <S-Left> :bprevious<CR>
nnoremap <S-Right> :bnext<CR>
-nnoremap <S-h> :bprevious<CR>
-nnoremap <S-l> :bnext<CR>
" ctrl-ae jump to line start/end
-nnoremap <c-a> 0
-nnoremap <c-e> $
-inoremap <c-a> <c-o>0
-inoremap <c-e> <c-o>$
-vnoremap <c-a> 0
-vnoremap <c-e> $
+nnoremap <C-a> 0
+nnoremap <C-e> $
+inoremap <C-a> <c-o>0
+inoremap <C-e> <c-o>$
+vnoremap <C-a> 0
+vnoremap <C-e> $
" Shortcut to toggle relative numbering mode
@@ -83,6 +87,9 @@ nnoremap <c-n> :call ToggleRelativeNumber()<CR>
" Open BufferExplorer
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