Skip to content

BbrianWwright/Vim_Config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Brian Wright's Vim Config

Installation

  • Run git clone https://github.com/BbrianWwright/Vim_Config.git to grab vim config
  • Run :PluginInstall to install plugins
  • Move _vimrc(corresponds to .vimrc) and vimfiles (corresponds to .vim) to your home directory (Slightly different for windows). Could also symlink, copy, or whatever...
    • Symlink ex.
     # must be absolute
     ln -s ~/Vim_Config/_vimrc ~/.vimrc
     ln -s ~/Vim_Config/vimfiles ~/.vim
    

Adding new plugins

  • For Vundle
    • Just add in _vimrc and do :PluginInstall when ready

Font

Useful Vim Links

Shamelessly copying a nice email a mentor of mine wrote to me:

So when first starting to learn vim I suggest not going crazy with plugins at first.

Remember in vim you can generally type :help <something> in normal mode and it'll tell you what <something> does. For example, :help gg.

Latest Version

To start though, you'll want an updated vim. If you have Homebrew you can use that. I go a simpler route and install MacVim and then add an alias to my.profile:

alias vim=/Applications/MacVim.app/Contents/MacOS/Vim

This gets me vim 7.4 which has some nice features.

.vimrc

There are definitely some .vimrc things you want to add though. To start, these two are good resources:

Really, start fairly vanilla and when you don't like something or are looking for a feature you add it or change it.

I think relative line numbers is a really awesome feature since you can jump lines by doing something like 10j to go down ten lines.

Note that feature is only available in vim 7.4 or higher.

Plugins

For plugins I suggest using vim-pathogen because it's super easy to use. The guy who wrote it, Tim Pope, writes a ton of great vim plugins.

Another great plugin is vim-easymotion.

For syntax checking and linting syntastic is probably the best game in town. I have mines set up to use flake8 for Python.

Random Commands

Some commands I find useful are:

  • gg: top of file
  • G: bottom of file
  • zz: center screen on current line
  • o: insert line below and go into insert mode
  • gqq: hard wrap current line to max width (default 80 characters)
  • ci(: delete all characters in between my current paren level and go into insert mode
  • ci": same as above but with quotes
  • Ctrl+V: go into block edit mode
  • %s/regex_search/regex_replace/g: search and replace all instances on all lines
  • %s/\vsearch/replace: use perl style regex instead of vim's weird regex style (see this)

Releases

No releases published

Packages

No packages published