GGTS or STS or Eclipse or any other IDE for that matter is too bulky and slows your machine. But more importantly if you are someone like me who would rather use a keyboard than a mouse then using vim instead of an IDE is going to be even more fun. The speed with which I can manipulate files, check for syntax, format code and use information from git version history is pretty slick.
Some of the features that are absolutely fabulous within GGTS or STS include
- Content Assistant: suggests auto-completions as we type.
- Get declaration/implementation of variable/method in a single click (ctrl + click)
- Auto import and fix imports
- Git compare/commit files
- Searching within a project
- Renaming files, methods
- Project specific settings
Let us look at the alternatives available for each of these and how well one can do these things in Vim
Get declaration/implementation of variable/method in a single click (ctrl + click) and code completion
This can be done using Ctags, Tagbar and few .vimrc configurations.
For Mac OS X
brew install ctags
For Debian-based systems
sudo apt-get install exuberant-ctags
For Red Hat based systems
sudo yum install ctags
Add the following to your .vimrc (Installing using vundle)
Keyboard shortcuts to find function and class definitions
Ctrl+] - go to definition Ctrl+T - Jump back from the definition. Ctrl+W Ctrl+] - Open the definition in a horizontal split
Add the following to .vimrc
map <C-\> :tab split<CR>:exec("tag ".expand("<cword>"))<CR> map <A-]> :vsp <CR>:exec("tag ".expand("<cword>"))<CR>
Read more about ctags at.
Git compare/commit files.
Git support is pretty neat and the author of the plugin is not wrong in claiming this to be the best git wrapper of all time. Git grep, move, rename, checkout, diff and more. More info at github.
Searching within the project and optionally replace what matched or perform other operation
You can use git grep using fugitive again
:Ggrep findme :Qdo %s/findme/baz | update
This does require you to type the search string twice but does the job. The raw speed you get with vim for searching and other tasks is totally worth it.
Renaming a file
Find and open a file
Locate the file in NerdTree a file browser plugin
Once you located the file, press
m to modify the filename
Auto import and fix imports
Again using vundle install the grails import plugin
Project specific vim config
set exrc at the top of your .vimrc
set secure at the very end of your .vimrc
Close to 15 years in tech; I've served as a CTO and advisor to multiple organizations. Brought close to 20 products to market. As a founding member of multiple organizations I've done everything from tech to stratgey, sales, marketing, hiring, accounting and more. Experience in a variety of technologies including but not limited to AWS, Node, React, Serverless, ElasticSearch, Groovy, Java, Typescript, Angular, Grails, PHP, Drupal, Wordpress.
Always interested in looking at new tech, strategy and ways I can add value to organizations.