diff --git a/.vimrc b/.vimrc index cab348c..6ce2dca 100644 --- a/.vimrc +++ b/.vimrc @@ -7,6 +7,10 @@ " F9 Open NerdTree " M-F9 Show diff line " S-F9 Highlight diff line +" C-left/right switch tab +" C-up/down switch window +" M-left/right horizontal size +" M-up/down vertical size """"""""""" " GENERAL " @@ -91,6 +95,44 @@ else "set indentexpr "" endif +"""""""""" +" WINDOW " +"""""""""" +" create window below or at right of the current one +set splitbelow +set splitright +" if multiple windows +if bufwinnr(1) + " vertically increase/decrease window size with alt+up/alt+down + map + + map - + imap a + imap a + " horizontally increase/decrease window size with alt+right/alt+left + map > + map < + imap a + imap a + " switch to next/previous tab with ctrl+right/ctrl+left + map gt + map gT + imap a + imap a + " switch to next/previous window with ctrl+down/ctrl+up + map w + map W + imap a + imap a +endif +" open automatically quickfix window +if has("autocmd") + autocmd QuickFixCmdPost * cw +endif + +" open a file in the same directory as the current file with F2 and split with shift+F2 +map :tabe =expand("%:h") . "/" +nmap :split =expand("%:h") . "/" + """""""""""""""""""""""""""""""""""""""""""""""""" "Omni-completion par CTRL-X_CTRL-O """""""""""""""""""""""""""""""""""""""""""""""""""