This is not within the scope of this blog but you can find more details here.Ĭtags can be configured to skip indexing certain types of code. You can either rename your "tags" directory to something else, or change the location where the tags file will be generated. Please notice: if you already have a directory with a exact same name as "tags" under "my_django_project", you will get a "ctags: Failure on attempt to read file : Is a directory" error message. For example, here we generate a tags file for all python source code in the "my_django_project" directory and its sub-directories. Run ctags on your project folder to generate a tags file which contains locations of classes, members, and functions in your project. Copy taglist.vim to ~/.vim/pluginĪdd these two lines in ~/.vimrc to turn on file type detection. Quite handy for code navigation.ĭownload here. If $tabs & ] thenĮxec "$binary" -g $opts -remote-tab-silent "$binary" -g $opts "$binary" $opts to switch tabs.ĬTags and Tag list give you an outline of classes, members, and functions in a left-side panel. You might want to put the newly the opened file in a new tab.Īdd the following line at the top of the file below the comments.Īnd replace the if structure at the bottom of the file with the following: Here are some other settings for tab, indent, search, and line numbers:īy default, "vi a_new_file" in terminal will open a new MacVim window. For some people, if macvim cannot find mustang, you might need to rename Mustang.vim to mustang.vim.) (Mustang2 is another great color scheme with dark background. You can switch among dark, light, and blue themes by typing :LuciusLight, :LuciusDark, and :LuciusBlue individually in MacVim. vimrc to turn on syntax highlighting and set color scheme: This color scheme also supports light and blue themes. The Lucius color scheme with dark background is amazingly beautiful. Download the *.vim file, and put it to the ~/.vim/colors directory. Then, go here for a list of color schemes. To install a color scheme, first, create a directory: Light background could put a strain on my eyes after staring at screen more than one hour. I found dark background is easier for my eyes. The default MacVim color scheme isn't that appealing. To test if MacVim has python integrated, type configure -enable-pythoninterp -with-macsdk=10.6Īnd drag the MacVim icon into your /Applications folder.Īdd the following to ~/.profile or ~/.bash_profile.Īlias vim=/Applications/MacVim.app/Contents/MacOS/Vim $ sudo port install macvim +cscope +python26 Either of the following two options can be used to install MacVim.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |