Skip to content

rleal/vimrc

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

/home/rleal/.vim/vimrc

This Vim configuration is meant to make Vim feel more like an IDE than a simple console-based text editor. It's a fork from https://github.com/tlhunter/vimrc. I've added Vundle support and refresh some Plugins to make more an IDE PHP like.

Installation

Run these commands to get this Vim configuration working on your OS X or Linux machine:

cd ~
git clone --recursive git://github.com/rleal/vimrc.git .vim
ln -s ~/.vim/vimrc ~/.vimrc
vim +PluginInstall +qall

NOTE: If you have this not found error of YouCompleteMe:

ycm_client_support.[so|pyd|dll] and ycm_core.[so|pyd|dll] not detected; you need to compile YCM before using it. Read the docs!

execute:

~/.vim/bundle/YouCompleteMe/install.sh

Generate tags for autocompletion. Change to project directory and execute:

~/.vim/generate-php-tags.sh

The tags file will refresh every time yoy save a file (auto-tag plugin)

Features

  • Edit many files at the same time
  • File Browser on left side of screen
  • Functions, Variables, Classes on right
  • Move between files in center screen
  • View status of the current GIT repo, if applicable
  • Additional features when running under MacVIM
  • Quickly navigate to files using a fuzzy finder
  • Code Completion

Comments

  • Use ,ci to toggle line comments on line/s

Switching between files (Buffers)

  • Use ,q to close the current file (a different file will appear in its place)
  • Use Ctrl h Ctrl l to move between open files
  • Ctrl Left Ctrl Right also works for switching between files
  • While in MacVIM, you can swipe left and right to switch between open files
  • Use Cmd Shift N (or Alt n in Linux GVim) to open a new empty buffer

Viewports (Windows/Splits)

  • Use ,h ,j ,k ,l to navigate between viewports
  • Use ,Q to close the current window (you probably won't ever need to do this)
  • Use ,n to toggle the file browser
  • Use ,y to toggle the tag browser
  • Use Ctrl+P to perform a recursive fuzzy filename search
  • Use ,a and type a phrase to search to search based on content within your files (quote and escape if needed)
  • Use ,A to close the open ack search results at the bottom of the screen

File Browser (NERDTree)

  • Use ,n to toggle the file browser
  • Use standard movement keys to move around
  • Use Ctrl j and Ctrl k to move between siblings (aka skip over children in expanded folders)
  • Use C to make the highlighted node the current working directory
  • Use :Bookmark BookmarkName to bookmark the current selection
  • Use B to toggle the bookmark menu
  • Use ? if you'd like some NERDTree documentation
  • Use o to open the selected file in a new buffer
  • Use t to open the selected file in a new tab

Tabs

  • Use Cmd t (or Alt t in Linux GVim) to open a new tab
  • Use Cmd w (or Alt w in Linux GVim) to close the current tab
  • Use Cmd 1 to Cmd 9 (or Alt 1 to Alt 9 in Linux GVim) to navigate to the specified tab

Tag Browser (Tag List)

  • Use y to toggle the tag browser viewport
  • Use s to reorder the items by alpha or occurance

PHPUnit

  • Use ,la to execute all tests

Git

  • Use :Gstatus to view git status
  • Use :Gdiff to show file diffs and solve conflicts

Themes (ColorSchemes)

There is a very large collection of colorschemes in this repository. Many of them can be seen here. Set the scheme using :colorscheme NAME.

Pre-Requisites

Copying and Pasting between OS

  • Use ,c to copy the highlighted text into the OS clipboard
  • Use ,v to paste the OS clipboard into the document

About

My personal VIM configuration

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Vim Script 100.0%