diff --git a/vim/abbreviations.vim b/vim/abbreviations.vim index fc89812..d477e9e 100644 --- a/vim/abbreviations.vim +++ b/vim/abbreviations.vim @@ -1,4 +1,3 @@ -" -- Abbreviation Dictionary ------------------------- {{{ iabbrev @@ wagner.wryn@gmail.com iabbrev ssig -----------------------Wryn Wagnerwagner.wryn@gmail.com(720)557-5443----------------------- @@ -8,11 +7,10 @@ iabbrev apap # arrange # act # assert iabbrev acac % arrange % act % assert -" -- JAVA -------------------------------------------- {{{ +" -- java -------------------------------------------- {{{ iabbrev psvm public static void main(String[] args) {} " }}} -" -- MARKDOWN ---------------------------------------- {{{ +" -- markdown ---------------------------------------- {{{ iabbrev termdef ## Terms and DefinitionsTerm \| Definition--- \| --- " }}} -" }}} diff --git a/vim/my_colors.vim b/vim/color.vim similarity index 100% rename from vim/my_colors.vim rename to vim/color.vim diff --git a/vim/edit_rc.vim b/vim/edit_rc.vim deleted file mode 100644 index 36b4142..0000000 --- a/vim/edit_rc.vim +++ /dev/null @@ -1,6 +0,0 @@ -" -- VIMRC ------------------------------------------- {{{ -nnoremap ev :vsp $WRYNVIMRC -nnoremap sv :source $MYVIMRC -nnoremap eb :vsp $MYBASHRC -nnoremap emb :vsp $WRYNBASH -" }}} diff --git a/vim/file_formatting.vim b/vim/formatting.vim similarity index 97% rename from vim/file_formatting.vim rename to vim/formatting.vim index 1f9ff26..a3df37e 100644 --- a/vim/file_formatting.vim +++ b/vim/formatting.vim @@ -31,7 +31,7 @@ augroup execute_file_shortcuts augroup end " }}} -" -- Miscelaneous File-specific Commands ----------------- {{{ +" -- Miscellaneous File-specific Commands ---------------- {{{ augroup latex_commands " overwrite the t 'test' to (double) recompile the latex document. diff --git a/vim/global_sets.vim b/vim/global_sets.vim index 6b1699a..d941227 100644 --- a/vim/global_sets.vim +++ b/vim/global_sets.vim @@ -1,23 +1,21 @@ -set linebreak " automatically wraps text -set breakindent " indent for single-line wrap -set breakindentopt=shift:3 " indent amount for single-line wrap set formatoptions=lj -" l = prevents the breaking up of words -" j = remove comment leaders when joining lines -let &t_co=256 " use 256-color +set number relativenumber -set number " show line numbers -set relativenumber +set linebreak breakindent breakindentopt=shift:3 +set autoindent smartindent -set autoindent " match indentation with next line -set smartindent " match indentation with syntax - -set spellfile=$VIM_DIR/en.utf-8.add -set spelllang=en +set timeoutlen=200 set showmatch " -- emit 'beep' when no matching symbol, set matchtime=0 " -- but don't jump to it. -set timeoutlen=200 " -- short timeout for multi-key functions + +set t_ZH= t_ZR= " italic start / end characters + +set spellfile=$VIM_DIR/en.utf-8.add spelllang=en + +set encoding=utf-8 + +let &t_co=256 diff --git a/vim/navigation.vim b/vim/navigation.vim new file mode 100644 index 0000000..20115b2 --- /dev/null +++ b/vim/navigation.vim @@ -0,0 +1,22 @@ + +" (SHIFT + DIRECTION) for tabs +nnoremap gt +nnoremap gT +nnoremap T + +" (CTRL + DIRECTION) for panes +nnoremap l +nnoremap h +nnoremap j +nnoremap k + +" (CTRL + n/p) for files +nnoremap :n +nnoremap :N + + +" ( + e + RC_PREFIX) for edit rc +nnoremap ev :sp $WRYNVIMRC +nnoremap sv :source $MYVIMRC +nnoremap eb :sp $BASHRC +nnoremap ez :sp $ZSHRC diff --git a/vim/rc.vim b/vim/rc.vim index ee4d8f0..b3445a1 100644 --- a/vim/rc.vim +++ b/vim/rc.vim @@ -1,74 +1,73 @@ -" -- Environment Variables --------------------------------------- {{{ +" set the following environment variables: +" $RC_DIR $VIM_DIR $WRYNVIMRC $BASHRC $ZSHRC $WEBBROWSER source $HOME/.wryn/env/env.vim -"sets the following variables: -"$RC_DIR $VIM_DIR $WRYNVIMRC $WRYNBASH $MYBASHRC $WEBBROWSER -set encoding=utf-8 - -" set italics characters -set t_ZH= -set t_ZR= - -let mapleader = "\\" -"let localmapleader = ',' - -" Load Vundle first if isdirectory(expand("$HOME/.vim/bundle/Vundle.vim")) source $VIM_DIR/vundle.vim endif source $VIM_DIR/global_sets.vim -source $VIM_DIR/file_formatting.vim -source $VIM_DIR/edit_rc.vim +source $VIM_DIR/formatting.vim source $VIM_DIR/abbreviations.vim -source $VIM_DIR/window_pane_navigation.vim -source $VIM_DIR/my_colors.vim +source $VIM_DIR/navigation.vim +source $VIM_DIR/color.vim -augroup general_bindings +let mapleader = "\\" +"let localmapleader = ',' + +augroup personal_bindings " {{{ + " to execute macro on q nnoremap @q - + " Q to replace current line/selection with bash execution vnoremap Q !$SHELL nnoremap Q !!$SHELL + " \q for `q:` + nnoremap q q: + + " \s previous selection command + nnoremap s :'<,'> + + " \f for fold + nnoremap f z + nnoremap f z + + " \j for J, but append current line to the line below + nnoremap j ddpkJ + + " move the current line one below where it is + nnoremap - :m +1 + nnoremap _ :m -2 + + " \t for rerun last 'test' command: + nnoremap t q:?test + + " \b for git blame + nnoremap b :set termwinsize=15*0:execute "terminal git blame -L " .eval(line(".")-5) . ",+10 %":set termwinsize& + " \d to insert formatted date before/after cursor nnoremap di :let @d = system("date '+%A, %B %-d, %Y'")id nnoremap da :let @d = system("date '+%A, %B %-d, %Y'")a d - + + " - toggle casing for current word + inoremap viw~ea + " \c \v to copy/paste from xclip " @TODO: learn how to freaking compile vim with x11 compatibility so these " aren't necessary :) vnoremap c :w !xclip nnoremap v o!!xclip -o - - " \b for git blame - nnoremap b :set termwinsize=15*0:execute "terminal git blame -L " .eval(line(".")-5) . ",+10 %":set termwinsize& - - " \s previous selection command - nnoremap sq :'<,'> nnoremap sc :'<,'>w !xclip - - " \q for `q:` - nnoremap q q: - - " \t for rerun last 'test' command: - nnoremap t q:?test - - " \f for fold - nnoremap f z - nnoremap f z - - " append current line to the line below - nnoremap j ddpkJ - - " - to move the current line one below where it is - nnoremap - :m +1 - nnoremap _ :m -2 - - " - (insert mode) set current word to upper-case - inoremap viwUea - + + " ------- available / rarely used bindings ------- + + " nnoremap + " nnoremap + " nnoremap + " nnoremap z + " nnoremap ^ " }}} augroup end diff --git a/vim/vundle.vim b/vim/vundle.vim index 8d9bc0b..df1b1e4 100644 --- a/vim/vundle.vim +++ b/vim/vundle.vim @@ -8,28 +8,31 @@ set rtp+=~/.vim/bundle/Vundle.vim call vundle#begin() Plugin 'VundleVim/Vundle.vim' - " <======================================================> " <==== Insert plugins here =============================> " tpope/surround Plugin 'tpope/vim-surround' + " nerdtree Plugin 'git://github.com/scrooloose/nerdtree.git' + " youCompleteMe Plugin 'git://github.com/Valloric/YouCompleteMe.git' + " omnisharp (c#) Plugin 'OmniSharp/omnisharp-vim' + " ale -- asynchronus error checking Plugin 'https://github.com/w0rp/ale' +" <======================================================> " <======================================================> call vundle#end() filetype plugin indent on " To ignore plugin indent changes, instead use: " filetype plugin on -" Brief help " :PluginList - lists configured plugins " :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate " :PluginSearch foo - searches for foo; append `!` to refresh local cache @@ -37,15 +40,17 @@ filetype plugin indent on " see :h vundle for more details or wiki for FAQ + " =================================================================================== " === PLUGIN-SPECIFIC SETTINGS ====================================================== " =================================================================================== -" --- Nerd Tree --- +" --- Nerd Tree --------------------------------------------------------------------- map :NERDTreeToggle % let g:NERDTreeNodeDelimiter = "\u00a0" " -- Was seeing ^G character, and this should fix that -" --- YouCompleteMe (YCM) --- + +" --- YouCompleteMe ----------------------------------------------------------------- function! ToggleYCM() if g:ycm_auto_trigger let g:ycm_auto_trigger = 0 @@ -58,12 +63,14 @@ endfunction let g:ycm_goto_buffer_command = 'new-tab' -nnoremap :call ToggleYCM() +nnoremap :call ToggleYCM() nnoremap gd :YcmCompleter GoToDefinition + " STARTS DEACTIVATED " let g:ycm_auto_trigger=0 -" --- ALE --- + +" --- ALE --------------------------------------------------------------------------- let g:ale_linters = { \ 'cs' : ['OmniSharp'], \ 'python' : ['pylint'] @@ -73,6 +80,3 @@ let g:ale_lint_on_insert_leave = 'never' nnoremap ae :ALENext nnoremap ar :ALEPrevious - -" --- command t --- -nnoremap T :CommandT diff --git a/vim/window_pane_navigation.vim b/vim/window_pane_navigation.vim deleted file mode 100644 index f0770b3..0000000 --- a/vim/window_pane_navigation.vim +++ /dev/null @@ -1,15 +0,0 @@ -" -- Pane/Window Navigation -------------------------- {{{ -" (SHIFT + DIRECTION) for tabs -nnoremap gt -nnoremap gT - -" (CTRL + DIRECTION) for panes -nnoremap l -nnoremap h -nnoremap j -nnoremap k - -" (CTRL + n) for files -nnoremap :n -nnoremap :N -" }}}