-
Notifications
You must be signed in to change notification settings - Fork 0
nazgum/vimrc
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Installation (based on https://github.com/goomerko/vim-rails.config/tree/master) ============ Dependencies: vim with ruby support ACK (or comment line 147 in vimrc file - not tested). cURL (not sure) Exuberant ctags Required gems: - jamis-fuzzy_file_finder (gem sources -a http://gems.github.com if needed) - ruby-debug-ide 1. Backup your .vimrc file and .vim directory 2. In your home, do: git clone git://github.com/nazgum/vim-rails.config.git .vim ln -s .vim/vimrc .vimrc 3. Enjoy! Note for Windows users: .vimrc must be renamed to $HOME/_vimrc .vim must be renamed to $HOME/vimfiles In .vimrc file change paths at lines 21 and 22. For example: C:\windows\temp Plugins ======= 1. Rails 2. AutoComplPop (popup for completions) 3. Trinity (srcexpl, taglist, NERD_tree) 4. allml (helps to write tags) 5. endwise.vim (Wisely add "end" in ruby, endfunction/endif/more in vim script, etc) 6. fuzzy_finder_textmate 7. gist 8. matchit 9. surround 10. vcscommand (SCM client) 11. ruby_debugger (sorry netbeans, bye bye) ;-) 12. snipMate (snippets) 13. tComment 14. vimwiki (a personal wiki) There're other plugins not listed here because are dependencies. Usage(or tips) ============== Trinity: F8 Toggle NERD_tree. I load it always F7 Toggle Taglist. Often it off when I work with views. F6 Toggle srcexpl. Almost never use it. F5 To invoke the holy trinity. I never use it :) tComment: <C-_><C-_> Toggle comment More shortcuts :help g:tcommentOpModeExtra* allml: Useful when you're editing *ml files. In ERB files I use the shortcuts: " Mapping Changed to (cursor = ^) <C-X>= foo<%= ^ %> <C-X>- foo<% ^ %> <C-X>' foo<%# ^ %> (mnemonic: ' is a comment in ASP with VBS) <C-X><Space> <foo>^</foo> <C-X><CR> <foo>\n^\n</foo> Read allml.vim to find other shortcuts. fuzzyfinder_textmate: These mappings has been changed because it collided with ruby_debugger \ft FuzzyFinder textmate mode \ff FuzzyFinder files mode leader = \ matchit: Matching "%" surround: help surround ;-) vcscommand: Useful commands: VCSCommit Do commit! VCSLog Show log VCSVimdiff Compare current buffer with latest commit VCSVimdiff <n> Compare current buffer with a concrete commit(being "n" release number) I disabled VCS* mappings because I don't use it never. AutoComplPop (aka acp): Advise: My preference for this plugin is very personal and it can be a annoying for you. This plugin open a popup for completions when you enter characters. It's very useful when you have long/rare/... class/method/... names. You only write a few letters and it show the popup. <C-n> Jump to the next word <C-p> Jump to the previous word It help you to remember snipMate snippets writing the first letter of the snippet as capital letter (Only works with one letter) To disable this plugin (i.e.: when writes in your personal wiki): :AcpDisable To enable again: :AcpEnable ruby_debugger: See usage in the help (:help ruby-debugger). Mappings and functions ====================== Tabs: gt move to next tab gT move to previous tab t% open actual buffer in a tab td close tab Toggle: F2 paste mode F3 list chars F4 wrap text Tabs: In visual mode: <Tab> Indent <S-Tab> Unindent Grep(with ACK) :Rgrep <string> Search the string along the project and show results in quickfix window :Rgrepdef <string> Search a method with the string along the project and show results in quickfix window Tags: In rails projects you can generate tags file with the command: :Rtags In other projects you should do it in the shell: $ ctags -R . Both commands will create a file called tags with is an index of our source code. To use tags in vim: <C-[> Jump to definition(tag) under the cursor <C-T> Back again :ts <regex> List tags that match with regex
About
my vim setup
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published