dotfiles

$HOME is where the <3 is
git clone git://git.alexkarle.com/dotfiles.git
Log | Files | Refs | Submodules | README

commit 78dfb81d829fd06ce01a9394a0c8519cb4c92c67 (patch)
parent be1cc01fe38c9c25a50c49f1ecdcfffac6292a36
Author: Alexander Karle <akarle@umass.edu>
Date:   Mon, 12 Mar 2018 18:29:56 -0400

Tweaking Vimrc

Fixing escape delay, adding wildmenu and cursor line on insert,
key mapping for making a new session (overwrite old),
and (shocking!) drifting from jk as <ESC> (in favor of CTRL-[)

Diffstat:
Mvim/ftplugin/tex.vim | 4++++
Mvim/keys.vim | 5++++-
Mvim/theme.vim | 19+++++++++++++------
Mvim/vimrc | 14+++++++++++++-
4 files changed, 34 insertions(+), 8 deletions(-)

diff --git a/vim/ftplugin/tex.vim b/vim/ftplugin/tex.vim @@ -6,3 +6,7 @@ noremap <buffer> <silent> $ g$ " spell check! setlocal spell spelllang=en_us + +" soft word wrap should not break words +" NOTE: don't use listchars with this feature +set linebreak diff --git a/vim/keys.vim b/vim/keys.vim @@ -2,7 +2,7 @@ " KEY MAPPINGS "================================ "Map 'jk' to ESC (its wonderful) -inoremap jk <ESC> +" inoremap jk <ESC> "TEMPORARILY COMMENTING IN FAVOR OF ctrl-[ "Map ctrl-i/j/k/h to switch between splits nnoremap <C-j> <C-w>j @@ -18,3 +18,6 @@ iabbrev </ </<C-X><C-O> " Elim Whitespace (through regexp) nmap _$ :call CMDPreserve("%s/\\s\\+$//e")<CR> + +" save session +nnoremap <leader>s :mksession!<CR> diff --git a/vim/theme.vim b/vim/theme.vim @@ -4,23 +4,30 @@ "Syntax highlighting on syntax on +" Set cursor line when in insert mode (to indicate insert mode) +if(has('autocmd')) + autocmd InsertEnter,InsertLeave * set cul! +endif + " COLORSCHEME -" use iterm profiles to determin background +" use iterm profiles to determine background if $ITERM_PROFILE=='light_background' set background=light else set background=dark endif -" load colorscheme if plugins installed -if filereadable(expand("~/.vim/bundle/vim-one/colors/one.vim")) - colorscheme one -endif - " if can use truecolor, do if (has("termguicolors")) set termguicolors + " load colorscheme if plugins installed + if filereadable(expand("~/.vim/bundle/vim-one/colors/one.vim")) + colorscheme one + " reverse one-dark's fold colors + highlight Folded guibg=#282c34 guifg=#5c6370 + endif + " Needed for termgui in tmux--&term begins w screen-... if &term =~# '^screen' " Set the terminal foreground+background colors diff --git a/vim/vimrc b/vim/vimrc @@ -3,7 +3,7 @@ "============================= "line numbers on set number -set relativenumber +"set relativenumber "tab is really spaces set expandtab "4 spaces per tab @@ -41,6 +41,18 @@ set listchars=space:·,tab:>–,trail:~,eol:¬ " Prevent {}, (), [] commands from opening folds set foldopen-=block +" Prevent windows resizing when split opened/closed +set noequalalways + +" Show the command being typed +set showcmd + +" More visual completion for command mode +set wildmenu + +" Set key code timeout to be less to avoid <ESC> delay +set ttimeoutlen=30 + " Source helper files " Only load plugins if vim-plug installed! if filereadable(expand("~/.vim/autoload/plug.vim"))