From 0808fe24e2a0723b67cc743171642a685dd9db68 Mon Sep 17 00:00:00 2001 From: Jonas Gunz Date: Tue, 17 Sep 2019 12:31:31 +0200 Subject: Shortcuts --- .vim/vimrc | 61 ++++++++++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 46 insertions(+), 15 deletions(-) (limited to '.vim') diff --git a/.vim/vimrc b/.vim/vimrc index 19e575e..2fa11cc 100644 --- a/.vim/vimrc +++ b/.vim/vimrc @@ -1,3 +1,8 @@ +" =========== +" VARIABLES +" =========== + + set nocompatible "Disable bell set vb @@ -13,47 +18,73 @@ let g:airline#extensions#branch#enabled = 1 let g:airline#extensions#whitespace#enabled = 1 let g:airline_powerline_fonts = 1 -"??let mapleader = "," +" Use todo#Complete as the omni complete function for todo files +au filetype todo setlocal omnifunc=todo#Complete + +" Auto complete projects +au filetype todo imap + + + +" Auto complete contexts +au filetype todo imap @ @ + +" leader +let mapleader = "-" +let leader = "-" +let maplocalleader = "-" + execute pathogen#infect() syntax on filetype plugin indent on +"Line number Highlight +set nu +highlight LineNr term=bold cterm=NONE ctermfg=DarkGrey ctermbg=NONE gui=NONE guifg=DarkGrey guibg=NONE + +" ============== +" SHORTCUTS +" ============== + "Switch windows with keys nmap :wincmd k nmap :wincmd j nmap :wincmd h nmap :wincmd l -nmap :make +nmap :make nmap :NERDTreeToggle nmap :TlistToggle nmap :Newterm -command -bar Newterm call Create_term() - -function Create_term() - tabnew - terminal - startinsert -endfunction - "Tab mgmt nmap :tabclose nmap :tabprevious nmap :tabnext nmap :tabnew -"^] Jump to tag, ^t jump back -command! MakeTags !ctags -R . -"Line number Highlight -set nu -highlight LineNr term=bold cterm=NONE ctermfg=DarkGrey ctermbg=NONE gui=NONE guifg=DarkGrey guibg=NONE +" =========== +" COMMANDS +" =========== " Command HEXMODE command -bar Hexmode call ToggleHex() +"^] Jump to tag, ^t jump back +command! MakeTags !ctags -R . + +command -bar Newterm call Create_term() + +" =========== +" FUNCTIONS +" =========== + +function Create_term() + tabnew + terminal + startinsert +endfunction + " helper function to toggle hex mode function ToggleHex() " hex mode should be considered a read-only operation -- cgit v1.2.3