diff --git a/requirements.txt b/requirements.txt index 4966761..747692a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,12 +5,12 @@ isort==4.2.2 requests==2.9.1 speedtest-cli==0.3.4 venmo==0.3.6 -virtualenv==14.0.6 +virtualenv==15.0.0 ## The following requirements were added by pip freeze: appnope==0.1.0 -awscli==1.10.10 +awscli==1.10.12 boto3==1.2.6 -botocore==1.4.1 +botocore==1.4.3 colorama==0.3.3 configobj==5.0.6 decorator==4.0.9 diff --git a/tmux.conf b/tmux.conf index 78b97ae..dd473c5 100644 --- a/tmux.conf +++ b/tmux.conf @@ -92,3 +92,8 @@ set-window-option -g window-status-current-bg default # message text set-option -g message-bg default set-option -g message-fg brightred + +# don't wait for an escape sequence after hitting +# Esc. fixes insert mode exit lag in vim +set -sg escape-time 0 + diff --git a/vimrc b/vimrc index 040b001..c04d1ef 100644 --- a/vimrc +++ b/vimrc @@ -24,6 +24,10 @@ set smarttab " be smart when using tabs set tabstop=4 " 1 tab == 2 spaces set splitbelow " all horizontal splits open to the bottom +set ru " shows ruler for cursor +set sc " showcmd shows incomplete commands +set foldmethod=syntax " set a foldmethod +set foldnestmax=1 set splitright " all vertical splits open to the right set mouse=a " enable mouse @@ -43,6 +47,7 @@ augroup END " MacVim set guifont=Inconsolata-dz:h13 +"remove all scroll bars set guioptions-=r set guioptions-=L @@ -69,6 +74,20 @@ map k map h map l +noremap +noremap +noremap +noremap + +" But I like navigating in insert mode +inoremap h +inoremap j +inoremap k +inoremap l + +" A little hack to redraw the cursor when exiting insert mode. +" Places the cursor at the character from which we exited insert mode. +inoremap `^ """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " PLUGINS """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" @@ -93,6 +112,8 @@ Plug 'jiangmiao/auto-pairs' Plug 'tpope/vim-surround' Plug 'tpope/vim-repeat' Plug 'ludovicchabant/vim-gutentags' +Plug 'SirVer/ultisnips' +Plug 'honza/vim-snippets' " snippet library " Git Plug 'tpope/vim-fugitive' @@ -118,6 +139,8 @@ Plug 'pangloss/vim-javascript' Plug 'saltstack/salt-vim' Plug 'stephpy/vim-yaml' Plug 'evanmiller/nginx-vim-syntax' +" Man page navigation +"Plug 'bruno-/vim-man' " Python Plug 'klen/python-mode' @@ -175,6 +198,13 @@ let g:pymode_rope = 0 let g:pymode_rope_completion = 0 let g:pymode_lint_checkers = ['flake8'] +" Trigger configuration. Do not use if you use https://github.com/Valloric/YouCompleteMe. +let g:UltiSnipsExpandTrigger="" +"let g:UltiSnipsJumpForwardTrigger="" +let g:UltiSnipsJumpForwardTrigger="" +"let g:UltiSnipsJumpBackwardTrigger="" +let g:UltiSnipsJumpBackwardTrigger="" + """""""""""""""""""""""""""""" " FZF """""""""""""""""""""""""""""" @@ -186,8 +216,14 @@ autocmd VimEnter * command! -nargs=* Ag call fzf#vim#ag noremap :silent FZF -" Search word under cursor by using Ag | leader + a -noremap a :silent Ag =expand('') +" If you want :UltiSnipsEdit to split your window. +let g:UltiSnipsEditSplit="vertical" +" Create Blank Newlines and stay in Normal mode +nnoremap j o +nnoremap k O + +" Ctrl-Space will toggle folds! +nnoremap za " Search tags in buffer by using leader + t noremap t :silent BTags @@ -215,3 +251,66 @@ nnoremap :silent call fzf#run({ \ 'options': '+m', \ 'tmux_height': '40%' \ }) +" Remap ;w to escape in insert mode. +inoremap ;; ;:w +inoremap ;w :w + +" Swap ; and : Convenient. +nnoremap ; : +nnoremap : ; + +" Clear the highlighting +nnoremap :noh + + +" remember things yanked in a special register, so we can delete at will +" without concerns +nnoremap p "0p +nnoremap P "0P + +" often I want to find the next _ +onoremap W f_ +nnoremap W f_l +onoremap E t_ +nnoremap E lt_ +onoremap B T_ +nnoremap B hT_ + +" In my mind, p means parentheses +onoremap p i( + +" Usually, when making the header file, I want to just copy the original file, +" and append a ; to the end of each declaration and delete the body of the +" (folded) function. This automatically does just that. +nmap h A;jddj + +" Make Y like D and every other cap command +nnoremap Y y$ + +" Next Tab +nnoremap :tabnext + +" Previous Tab +nnoremap :tabprevious + +" Edit vimrc \ev +nnoremap ev :tabnew:e ~/.vimrc + +" ctags +nnoremap :vsp :exec("tag ".expand(""))zz + +" Search mappings: These will make it so that going to the next one in a +" search will center on the line it's found in. +map N Nzz +map n nzz + +" Make it so there are always several lines visible above and below the cursor +set scrolloff=10 + +" Properly display man pages +" ========================== +runtime ftplugin/man.vim +if has("gui_running") + nnoremap K :exe "Man" v:count "" +endif +