Quantcast
Channel: Iflexion Web Development Blog » rich applications
Viewing all articles
Browse latest Browse all 4

Application Development: Vim as development environment

$
0
0

Vim [http://www.openvim.com/] is a successor of the ancient vi text editor, which was created as primary UNIX visual text editor several decades ago when computers were really big and expensive. Despite such a great age, Vim is still a very popular and useful tool in Software Application Development and DevOps. Both console and GUI versions are available for all operating systems and platforms. It’s included into any standard installation set of Linux/UNIX family system. Because of its plain nature, our programmers can use Vim as both regular text editor installed and runned locally and opened in remote shell via Internet with effective workflow even in case of slow network connection.

 

Features

 

In brief, Vim has 2 main modes: to navigate a cursor throw the text and to enter the text into place marked by the cursor. This would be the most terrible barrier between you and Vim. Don’t fight it. Just accept this approach and move on. The most famous feature is special navigation keys: h for moving cursor left, j — down, k — up and l — right. Thus, cursor navigation may be done even without regular arrow keys, because there were no such buttons on the ancient keyboards. Generally, the Force of Vim is a set of its shortcuts for specific editing actions. These make you a super-fast master-jedi of text editing. Modern Vim version is a full featured code editor. Besides, there a lot of plugins for any use case. E.g., provides ability to edit several texts (they are called buffers) simultaneously, ctags and cscope to parse and quick navigate through the code definitions like functions and variables, syntax highlighting. It’s handful to use some plugin manager system, like Vundle or Pathogen (I personally use NeoBundle package manager). Settings of plugins and Vim as a whole are usually placed to ~/.vimrc file, which is hosted in special repository on GitHub. When it needs to configure user account at new system, I clone that repository into local folder and link it to ~/.vimrc. Such approach allows me both configure my Vim environment fast and have the same version on all system.

 Vim as IDE

As IDE Vim has ability to open several files in appropriate buffers. There are several plugins both to navigate through file system and handle buffers. Iflexion developers use VimFiler [https://github.com/Shougo/vimfiler.vim] to work with files and Unite [https://github.com/Shougo/unite.vim] for buffers handling. All actions may be done without plugins by standard command line actions, but visual tools make Vim real IDE and allows us type less. I use neocomplete [https://github.com/Shougo/neocomplete.vim] for code completion and NerdCommenter [https://github.com/scrooloose/nerdcommenter] to comment/uncomment whole blocks of code quickly.

Vim is extremely popular in Application Development, so, other famous application and IDE’s provide special Vim-like modes. E.g., Visual Studio and JetBrains products (IntelliJ IDEA, PyCharm, WebStorm, etc.) have standard plugins to turn their code editing into Vim way. There is an extension for Google Chrome web browser, which apply basic hotkeys similar to Vim, like scrolling by hjkl and search by ‘/’.

It would take some time to learn Vim. But it’s worth it.


Viewing all articles
Browse latest Browse all 4

Trending Articles