Monday, 10 June 2013

Vim configuration


I have known vim for a long time. But until recently, I get to know how to use it efficiently. The power of vim originates from its various plugins. Since there is no center repository for these plugins like textmate, some plugins are hard to install; Conflicts also appear now and then.

The first thing to do is to configure the compile parameters. Some options are turned on to support more plugins, e.g., command-T requires ruby is enabled by vim.

./configure --with-features=BIG --enable-pythoninterp --enable-rubyinterp --enable-gui=no --with-x --enable-cscope --prefix=/home/wangwei/software

Once vim is installed. The first plugin to download is pathogen, which helps to manage your plugins. Next, you can configure your .vimrc file for window split, cursor moving, folding, etc. A good example is from nvie. The most frequently plugins I am using are: NERD-Tree, which is a file system explorer; Pyclewn, a plugin for gdb and pdb; vim-flake8, which is a superset of pep8 and pyflake for python syntax and style check. Python syntax folding, a plugin for python code folding based on syntax(the default folding/unfolding toggle is the space key).

Pyclewn puts the standard output into /dev/null by default. To display the standard output, open another terminal, type tty command(let the result by /dev/pts/11), set the tty in vim by : Cinferiortty /dev/pts/11.

Wednesday, 5 June 2013

IntelliJ+Maven

I didn't know IntelliJ IDEA until last week, when I set up the develop environment for a project. But after using it for one week, I have to say it is an excellent tool for coding and source view.

Similar to ecllipse, IntelliJ IDEA has many plugins, such as MavenScala . But it integrates these plugins much better than ecllipse. For example, maven project can be imported and built easily as the video shows:


To debug the maven project, you need to install it firstly, which downloads the dependent libraries, compiles your project and installs it into your local maven repository. Then, you can set breakpoints in your source code, and start debug through IntelliJ's debug tool.

IntelliJ also supports source view well. Source insight is well known for viewing c and c++ code. But for java and scala, IntelliJ would be a better choice. It provides definition jumps, function list, folding etc..

Last but no least, Git is integrated as default.

I will update this page later when I learn new features of IntelliJ.