vim dotfiles
This repository contains my personal vim configuration.
I prefer to remove vim configuration from the other repo dotfiles
, because that one can become a mess rapidly if I have to maintain it for MacOs, Ubuntu, Windows, Cygwin, etc...
Instead, just the vim configuration is quiet stable between platforms.
To use it, assuming that you are in your $HOME
folder, use the following command:
git clone https://github.com/sixro/vim-java-maven/ .vim
To install all plugins, go under the .vim
folder and execute:
git submodule init
git submodule update
To update all plugin:
git submodule update --recursive --remote
I followed the suggestions found in this video found on vimcasts.org
Basically, assuming that you are in your .vim
folder, you have to use the following command:
git submodule add GITREPO bundle/PLUGINNAME
I suggest to install in the same way even vim-pathogen
. The vimrc
assume that it is installed in that way.
- vim-pathogen: to manage multiple plugins
- vim-surround: to "wrap" text objects with characters, brackets, etc...
- factorus: to allow code refactoring
- alternate.vim: add helpers to define/handle alternate buffers
- open.vim: add command usable with
alternate.vim
- ultisnips: to create snippet of codes
- vim-medic_chalk: an amazing colorscheme
In order to create a colorscheme
you can run the following command:
:so $VIMRUNTIME/syntax/hitest.vim
in order to see all syntax
that can be highlighted.
- Follow my Leader by vimcasts.org
Shows that sometimes, instead of using mappings on key, you can use operators and motions as keys of your plugins. There is also an interesting article where Tim Pope discuss this topic with Andrew Radev
All videos found on the following websites are very good:
Other videos that I liked a lot:
- Synchronizing plugins with git submodules and pathogen by vimcasts.org
Shows how to handle plugins and vim configuration files - An introduction to vspec by vimcasts.org
An introduction to Vspec to make tests on Vim scripts - Project-wide find and replace by vimcasts.org
Shows how to usesubstitute
,argdo
,vimgrep
and an utilityQargs
to update theargs
with files matched byvimgrep
- Vim (09) - Substitute (Search and Replace) by TheFrugalComputerGuy
At that time of the video, he explains how to ask for a confirm during a search and replace - Search multiple files with :vimgrep by vimcasts.org
Shows how to usevimgrep
and suggests for larger projects to use different tools - The file explorer by vimcasts.org
A video about thenetrw
file explorer available in every vim installation - Testing compiler plugins by Greg Hurrell
Shows how to write acompiler
plugin setting up amakeprg
anderrorformat
and testing it - Vim For Rails Developers by Ben Orenstein
Contains some very good tips on how to usevim
for Rails development that could be applied also to other languages - Creating vim macros and saving them for later by Ben Orenstein
Shows how to create a macro to extract some code in a method (a sort ofBeforeEach
used inJUnit
) - Productivity Setup with Vimwiki, Taskwarrior and MDwiki: Part 1
Show how to use vimwiki to collect personal doc, journaling, checklists, etc... - More Instantly Better Vim by Damian Conway at OSCON 2013
Lots of fun such as the StarWars intro :) - A Vim Environment For Perl Developers by Damian Conway at Perl Conference 2017
Shows how he wrote some macros, scripts, etc... to work on Perl. He is the 1st I have seen mentioning a refactor script (he made it in Perl) - Keynote: A Simple Matter Of Programming by Damian Conway at a Perl Conference
Shows how he wrote a plugin to refactor, highlight code, etc... because all others IDE did it not perfectly - Let's Play with Vanilla Vim by Hezby Muhammad at vim-jp
A very good recap on how to use Vanilla vim only - Let Vim Do the Typing by George Brocklehurst A presentation on various topics. I liked the idea of staying as much as you can in normal mode
- Meet UltiSnips by vimcasts.org
Show how to setup your 1st snippet withUltiSnips
- UltiSnips Screencast - Ep 2 - Creating Basic Snippets by Holger Rapp
Explain how to create a snippet made usingUltiSnips
- Using Python interpolation in UltiSnips snippets by vimcasts.org
Shows how to use python interpolation - Using selected text in UltiSnips snippets by vimcasts.org
Shows advanced usages ofUltiSnips
with visual blocks using the${VISUAL}
statement