Eclipse has no option to display in full screen mode! By full screen mode, we mean that Eclipse occupies the entire display, with the Dash (on the left) and Panel (on the top) hidden. This is typically achieved in other applications by pressing F11. Note that, there is a maximize mode where the current Edtitor window is maximized, but this is different from full screen.
Easy Align is a plugin for Vim that makes it super easy to align your code along certain whitespace or characters. Unlike the Tabular plugin, Easy Align is actually easy to use, not requiring you to create and recall esoteric-looking arguments.
Below are a few examples of how I typically use this plugin. For everything below, first visually mark out the lines, press : followed by command given below:
To align text based on space characters as delimiter:
Align on first delimiter: EasyAlign \
Align on second delimiter: EasyAlign 2\
Align on last delimiter: EasyAlign -\
Align on last 2 delimiters: EasyAlign -2\
Align on all delimiters: EasyAlign *\
To align based on equals character as delimiter. For example, a block of assignment statements in C++. I visually block it and use the command: EasyAlign=
To align based on comma character as delimiter. For example, a block of function calls in C++ along their multiple comma characters: EasyAlign*,
To align a block of function parameters, one on each line: EasyAlign-\
The logic behind these commands is straightforward and is explained in the table of examples on the plugin’s Github page.
The Alternate Files plugin for Vim is simply called A.vim. It does a single, but very useful job for C and C++ files: it allows you to switch or alternate back and forth between source and header files.
If you are in foo.cpp source file and you type the command :A, Vim opens the corresponding foo.h header file. Vice versa.
Vim can be used to build your code by using the :make command. It runs the command appropriate for your compiler, parses the compile errors or warnings and provides them in the Quickfix window. The only problem with this is that the build process is synchronous: the build command takes over the terminal and until it is over you can neither view nor interact with Vim.
The Dispatch plugin by Tim Pope enables you to run the build command asynchronously. The plugin can be installed from source here. You have two choices: run the build command asynchronously in the foreground or in the background.
Run :Make to run the build asynchronously in the foreground. This is possible only if you are using a terminal multiplexer like Tmux. A split terminal opens up at the bottom and you can see the output of your build there. The focus remains in Vim and you can view and interact with the editor while the build carries on. If you are running Vim in a normal terminal, this command just runs the plain old :make synchronously.
Run :Make! to run the build asynchronously in the background. This can be run on Vim running in any setup. The build command runs in the background invisibly and you can view and interact with Vim while this is happening.
Run :Copen to view the build output either during the build or after it is complete in foreground or background.
I highly recommend this plugin for anyone who is already using :make since with no change you can now build asynchronously.
One of the most frequent operations I do in source code is to add, remove or toggle comments over blocks of code. I used to use the TComment plugin for Vim to do this.
Recently, I discovered Tim Pope’s Commentary plugin that does the same. I have switched to it since its code is smaller and simpler. The only operation I use is to visually mark the lines and gc to toggle commenting on it.
EasyTags is a fantastic plugin for Vim. It achieves two objectives that are related to each other: automatically index your source code and enhance the syntax highlighting of your source code. These two tasks are related because improving the syntax highlighting of code requires knowledge of what every word means in your code, which is what the tags provide. This adds another IDE-like feature to Vim.
This plugin uses the Exuberant Ctags tool, so you will need to have it installed already.
This plugin automatically generates tags for the currently open files using the ctags tool. This is written to ~/.vimtags. The tags are generated automatically when you do not move the cursor for a few milliseconds. Vim generates the CursorHold when you pause typing and EasyTags uses this to do its work. Note that the tags are generated even if your file is not yet saved, since EasyTags is using the buffer, not the file.
This plugin also automatically highlights the tags it has indexed. Vim can only highlight the keywords of a language, not the new types or functions you define in it. EasyTags uses the index it has generated and highlights all the tags. So, you should see a lot more of your code in colors.
This plugin can be configured to read and update the tags file of your project, instead of using ~/.vimtags. To do this, your Vim should be configured to walk back the directory hierarchy to pick the first tags file it can find. Then EasyTags can be requested to use this tags file for updating, if it is found. I achieve this by adding these two lines to .vimrc:
" Let Vim walk up directory hierarchy from CWD to root looking for tags file
" Tell EasyTags to use the tags file found by Vim
let g:easytags_dynamic_files = 1
To generate tags only when a file is saved, add this to .vimrc:
let g:easytags_events = ['BufWritePost']
To disable automatic highlighting of tags, add this to .vimrc:
let g:easytags_auto_highlight = 0
To explicitly ask EasyTags to index files, use the command :UpdateTags
To explicitly ask EasyTags to highlight tags, use the command :HighlightTags
Vim-Plug is a plugin manager for Vim which can automatically install, upgrade or delete plugins for you. The plugins you want to manage should be available on Github.
To install Vim-Plug, download the plug.vim file to the ~/.vim/autoload directory:
$ cd ~/.vim/autoload
$ curl https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim -o plug.vim
Add lines to your .vimrc to load Vim-Plug. You also indicate the directory where you want it to store the plugins it manages. Finally, you also list the plugins you want to manage. Github is assumed to be source of plugins, so you just need to provide the rest of the plugin URL. Here is an example:
There are many LaTeX plugins for Vim which can make editing and compiling LaTeX files easier. The most popular among these plugins is Vim-LaTeX. It can be installed from its Github page here using your favorite Vim plugin manager.
The main features I use in Vim-LaTeX is:
Compile currently open LaTeX file by typing \ll. Compilation errors are displayed in a buffer below and you can jump to the error line from there.