By Camry.Wu
This time you introduce how to edit the Java file in Vim
When the Javabrowser Editorial class file, the class resource tree is a useful thing, and it can be displayed intuitively with members, methods, etc. in the VIM, which can also be achieved like VC, JBuilder, of course, more than those Something, it is also easy to use. Just use Javabrowser.vim this script implementation. First go to Vim Online to find this script file. (You can find a lot of useful other scripts) and then find the installation of CTAGS on Google Method, (General Linux system with this program)
Copy javabrowser.vim to ~ / .vim / plugin / under the Linux system. Then you are configured in ~. / Vimrc: (ie, the path to the CTAGS program) Let javabrowser_ctags_cmd = '/ usr / bin / ctags' Vim is not a GUI version, then you can do the following settings, it will not change the window let javabrowser_inc_winwidth = 0 Run Vim When you open a Java file, enter: javabrowser can see the beautiful resource tree. But this file must It is a actual file. Javabrowser.vim can be copied to the plugin under the Vim directory in the Windows system. It also needs to set the javabrowser_ctags_cmd, the path to the CTAGS program. I usually set NMAP
Cancel before autocmd, if the Java file is edited, then read Java.vim macro definition (defined in the following description) If you edit a java file, read JCommenter.vim definition When new Java files are new, Java.skel content copy After reading Java.skel content, run GNP this macro command My java.skel content is this: / * * ---------------- ------------------------------------------ * File name: _filename_ * authors : Camry (camry.wu@gmail.com) * Created: _datetime_ * Copyright: (c) 2004 Vitular Inc. All Rights Reserved. * * Modifications: * * --------------- ------------------------------------------- * / package com.Vitular . * * @Author camry (Camry.Wu@gmail.com) * @version 1.0 * / public class _ClassName_ {/ ** * default constructor. * / Public _classname_ () {super } // end: _ClassName_ / ** * for test. * @Param args commond line parameters public static void main (femant string [] args {} // end: main * /} // end: _classname_ // /: ~ Run the gnp macro command, mainly to replace _classn AME_, _DATIME_, _FILENAME_ These three variables. GNP command specifies in the Java.vim macro file. Java macro defines how my Java.vim macro file is defined. First, another macro contains another macro Definition, here is some of my own definitions: "Enter the reflection abbr sprt system.out.println abbr psf public static final" will _filename_, _datetime_, _classname_ convert into a correct name "Note that the following two lines should be connected One line of text MAP GNP
Cr> IMAP