my vim stuff
Vim script Ruby
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
autoload
bundle
colors
doc
.gitignore
.gitmodules
Brewfile
README.md
init.vim
vimrc

README.md

My vim configs

Install:

cd ~
git clone git://github.com/aurelian/vim-config.git ~/.vim
brew bundle install
git sumbmodule init
git submodule update
ln -s ~/.vim/vimrc .vimrc

Some mappings in vimrc are MacOS specific.

Arrows are disabled in NORMAL mode

Stuff I should use more often

  • leader is

  • ## in cmd adds current path

  • text object selection and vim-surround

  • cmd-cr toggles fullscreen (in mvim, same shortcut as in iTerm2)

  • :set (no)list ( l) #=> hides/shows tabs and enters

  • A goes to end of line and changes to INSERT mode

  • o INSERT mode on next line

  • $/^0 end of line / beggining of line, same as H/L

  • paste on next line p

  • Ctrl-o / Ctrl-i for jumps in NORMAL mode

  • Ctrl-o to run 1 command in INSERT mode

  • Ctrl-h / Ctrl-l moves cursor left/right in INSERT mode

  • Ctrl-r " paste yanked text in command

  • fast vertical resize window ,<.>

Netrw - File Explorer vimcast

:vsp . #=> vertical split in cwd

:Vex . #=> vertical split in file folder

New file: %

New folder: d

o enter file/folder in horizontal split v enter file/folder in vertical split t enter file/folder in new tab

Working with qucikfix window

  • :copen
  • :ccl close (mapped to <leader-c>)
  • :cn goes to next error

Working with splits

  • ctrl + w _ maxout height of current split
  • ctrl + w | maxout width of current split
  • ctlr + w = normalize size
  • ctlr + w o closes all windows but current one
  • ctrl + w T move split to own tab

Plugins

F9 mapped to :Dispatch
:Focus bundle exec rspec " changes Focus to command
:Dispatch bundle exec rake db:migrate

Usage:

; mapped to :Files in normal mode
<c-t> Open selected file in a new 'tab' after the last tabpage.
<c-x> Open selected file in a split.
<c-v> Open selected file in a vsplit.

:Ack stuf

Usage:

    o    to open (same as enter)
    go   to preview file (open but maintain focus on ack.vim results)
    t    to open in new tab
    T    to open in new tab silently
    v    to open in vertical split
    gv   to open in vertical split silently
    q    to close the quickfix window