My config files for Neovim.
"MeuVim" is Portuguese for "MyVim".
My initial idea was to replace NetBeans as my IDE during my daily work as a web developer in 2011. Now I can say I achieved that.
I mostly use PHP, Python, Javascript, CSS and HTML. But not only.
So you want to use my Neovim setup? Ok, do the following:
- Clone this repo:
git clone [email protected]:InFog/meuvim.git ~/.config/nvim/ - Create the
~/.vimundodir for the persistent undo (it's magical, it will allow you to undo stuff when you close and reopen files) - Install the git submodules:
git submodule initandgit submodule updateto installplug, the plugin manager - Install the dependencies listed below (Dependencies)
- Start vim and run
:PlugInstallto install the Plugins (Extensions)- This currently depends on a couple commands needed for language support:
- composer for PHP
- npm for Javascript
- go for Golang
- python for Python
- This currently depends on a couple commands needed for language support:
- In order to have nice colors on the terminal you need to activate 256 colors:
- Add
export TERM="xterm-256color"in your~/.bashrcor thercfor your terminal - Then you need to open a new terminal (or run the rc...)
- Add
- All done, enjoy!
- I tested my vimrc with Neovim on Linux and Mac, in a terminal.
- If you want to use these files in Windows or MacVim, then the configuration is up to you, good luck.
- Having a good motivation to learn and use Vim is the key.
- I recommend you read my setup and get inspired to build your own.
- Try to learn only two or three new Vim commands per day. It doesn't seems too much, but by the end of one month you will already know more than 50 commands.
- Learn how to move around with h, j, k and l. It's not mandatory and using the arrows is also ok.
Only a few dependencies for everything to work fine:
- exuberant-ctags for Tagbar.
- For Debian install
exuberant-ctags - For Fedora install
ctags - For Mac you can try installing
ctagsviahomebrew.
- For Debian install
- To have Python autocomplete your Vim must have the +python flag.
- For Debian just install the package
vim-gnome.
- For Debian just install the package
python-git, for Debian- If you want the fancy stuff for your status bar you need those fonts: https://github.com/Lokaltog/powerline-fonts/
composerfor phpnpmfor javascriptnpm install -g typescriptto have the goodies from ALE.
gofor Golang- It is good to have
$GOPATHand$GOBINset up. Also, add$GOBINto your$PATH.
- It is good to have
java(OpenJDK) andgraphvizfor PlantUML support.pythonfor Pythonshellcheckto have Shell Scripts statically analyzed
Snippets : In this config there is a snippets plugin for several languages and I added a few options for PHP:
- foreacht
- Creates a
foreachloop for a template
- Creates a
- echot
- Creates an
echofor templates
- Creates an
- ift
- Creates an
iffor templates
- Creates an
Explore : to open the file explorer type ,t
Tagbar : to open the tags list type ,l
- Some keys for Tagbar:
xZoom in/out<space>Shows tag prototype-Hide the current fold+Show the fold under the cursor
%in command mode navigates to the opening/closing symbol.- The matchit plugin will do the same for HTML tags and improves the matching for other languages
It matches even the alternative syntax for
if,foreachand others inphp.
- The matchit plugin will do the same for HTML tags and improves the matching for other languages
It matches even the alternative syntax for
tnto open a new tab andtcortqto close the current tab.,/to clear the highlight of the current search.,wto remove trailing spaces.