Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nettofarah/vim-files
my vim files
https://github.com/nettofarah/vim-files
Last synced: 18 days ago
JSON representation
my vim files
- Host: GitHub
- URL: https://github.com/nettofarah/vim-files
- Owner: nettofarah
- Created: 2015-01-09T18:45:14.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-09-03T18:20:07.000Z (about 9 years ago)
- Last Synced: 2024-10-06T02:04:29.306Z (about 1 month ago)
- Language: Ruby
- Size: 1.9 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# A practical Vim configuration
## Configuration
### Setup basic configs
To set up the config, do the following (on your home directory):
```terminal
ln -s 'path_to_where_you_cloned_the_repo' .vim/
ln -s .vim/vimrc .vimrc
ln -s .vim/gvimrc .gvimrc (for gui configuration)
```### Setup Vundle
We are now using Vundle to manage the plugins \o/.
The first time you clone this repo you will also need to clone the vundle plugin (from you home folder):
```terminal
git clone https://github.com/gmarik/vundle.git .vim/bundle/vundle
```Then you need to tell vundle to install the plugins:
```terminal
vim +BundleInstall +qall
```
or from inside Vim:```vim
:BundleInstall
```### Extras
#### THE OLD FONT IS NOT WORKING ANYMORE, PLEASE UPDATE
If you want to use the fancy status bar on the Mac (it is on by default on the Mac) you will also need to install the 'Sauce Code Powerline Light' font on the extra/fonts folder.
It can be deactivated on the conf/defaults file.## Shortcuts (fairly outdated list, I will update them soon)
The majority of shortcuts are made to use with Rails development. So far this is done by default, but the intent of this config if to be flexible and so there will be a way to define which shortcuts to create depending on what is being used.
* AutoComplete
` ` - opens the autocomplete menu
* NerdTree
` ` - open the NERDTree windows (drawer)
* Search/Open **OUDATED**
` ` - search for a file (it is possible to filter the search)
` ` - show the open files (buffers). The last viewed file is selected and you can also filter the result
` c ` - search for a tag in the current buffer
` a ` - search for a tag in all open buffers
` w ` - search for the word under the cursor as a tag in current buffer
` W ` - search for the word under the cursor as a tag in all open buffers
` s ` - search for the selection as a tag in current buffer
` S ` - search for the selection as a tag in all open buffers
* Rails specific (you can press tab to auto-complete in most of them) **OUTDATED**
` ` - opens a model
` ` - opens a controller
` ` - opens a view
` ` - runs a script
` ` - extract a partial
` ` - runs generate
` ` - opens the log
` ` - preview the file
` t ` - create tags file for the current project (works only for rails projects)
` ` - goes to the test file (test unit/rspec)
` ` - goes to the migration file (models) or view file (controller method)
` ` - runs the test file
` ` - runs the test under the cursor
* Git specific
` ` - blame
` ` - diff
* Navigation
` ` - goes to the next tab
` ` - goes to the previous tab
` ` - scrolls down
` ` - scrolls up
* Windows
` ` - expand the current window
`= ` - set the window back to the default size
`o ` - keep only the current window open
`_ ` - expand current horizontal split
`| ` - expand current vertical split
` ` - goes to the splitted window at the left
` ` - goes to the splitted window at the down
` ` - goes to the splitted window at the up
` ` - goes to the splitted window at the right
`- ` - decrease the font size
`+ ` - increase the font size
* Dealing with lines
` ` - move the selected text or line up
` ` - move the selected text or line down
` ` - duplicate the line under the cursor
` ` - comment the line
* Other
` ` - select all
* TagBar
` ` - open the tagbar and focus it
` ` - toggle the tagbar
* gundo
` ` - toggle gundo and focus it
* Tasks
` ` - toggle task (done/undone)