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 git@github.com:InFog/meuvim.git ~/.config/nvim/
- Create the
~/.vimundo
dir 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 init
andgit submodule update
to installplug
, the plugin manager - Install the dependencies listed below (Dependencies)
- Start vim and run
:PlugInstall
to 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~/.bashrc
or therc
for 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
ctags
viahomebrew
.
- 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/
composer
for phpnpm
for javascriptnpm install -g typescript
to have the goodies from ALE.
go
for Golang- It is good to have
$GOPATH
and$GOBIN
set up. Also, add$GOBIN
to your$PATH
.
- It is good to have
java
(OpenJDK) andgraphviz
for PlantUML support.python
for Pythonshellcheck
to 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
foreach
loop for a template
- Creates a
- echot
- Creates an
echo
for templates
- Creates an
- ift
- Creates an
if
for templates
- Creates an
Explore : to open the file explorer type ,t
Tagbar : to open the tags list type ,l
- Some keys for Tagbar:
x
Zoom 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
,foreach
and 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
tn
to open a new tab andtc
ortq
to close the current tab.,/
to clear the highlight of the current search.,w
to remove trailing spaces.