Debugging Vim & Tmux
November 24, 2018
Reading Time: about 1 minute
Maintenance
~/.tmux/resurrect
stores the state files for resurrect and continuum~/.vim/views/*
stores the states files for folds – primarily vim
Useful debugging tips:
:scriptnames
see every relevant file that has been called to reach current state:verbose set background
find what file set a variable- How to Debug a Mapping!
- Finding what set a vim variable
rm ~/.vim/view/*</code>
- delete saved view/fold settings (they may change settings).vim --startuptime timecost.txt [file-to-open]
- see times on different aspects of load- Breezy VimColors
- Checking Vim current variable values
- Vim Textwidth
Checking what actions are slowing vim down
:profile start profile.log
:profile func *
- At this point, do the slow actions
:profile pause
noautocmd qall!
- Source
- This helps with solving the developer tools access problem with Conque-GDB
- Best of Vim
Plugins
Plugin Managers
- Pathogen
- Vundle - based off of Pathogen, manages installing and local storage, can do everything Pathogen can do
- Vim Awesome.com
- Vim Airline
Folds
syntax
for most languagesindent
for Python and HTML
ftplugin
- ftplugin allows you to specify more specific settings per file(type)
set
should besetlocal
in these files, or these edge case settings will “leak” out.- to force reload
ftplugin/*.vim
files, use:set filetype=
.