If you're trying to use this config checkout this cheat sheet.
If you choose regular vim you can install it on ubuntu via the
vim-nox package, or
on macOS with Homebrew via
brew install vim.
Table of Contents
- Using This Configuration
- Additional Dependencies
- Changing Configuration
- Adding Plugins
- Defaults Overridden
Using This Configuration
This configuration is supposed to be used directly, not forked. If you intend to keep up to date with changes made to this repo it's recommended that you just clone this repository and customize the config using the provided hooks. If you have a feature or fix to submit, feel free to fork and send a PR.
As simple as:
curl vimfiles.luan.sh/install | bash # To override you current config: # curl vimfiles.luan.sh/install | FORCE=1 bash
Most of the dependencies are installed automatically, assuming you have a
minimal development environment for you language. For example we download all
the tools for golang and elm automatically.
git is assumed to be installed
and so is
ack, if either of those is not, some plugins may not behave
ctags is used to jump to function definitions, it is not strictly necessary if
you don't need that functionality, if you want to be able to jump effectively
to definitions install the correct version of ctags.
brew uninstall ctags brew install --HEAD universal-ctags/universal-ctags/universal-ctags
exuberant-ctags from your OS is generally enough for most things, but if you want more CSS, ruby and other goodnesses you will need to manually compile and replace your ctags installation with: https://github.com/fishman/ctags
You should frequently update you copy of this config, to get latest fixes and improvements. To do so you can run:
/usr/local/bin is on your
PATH on OSX or
~/bin/ on Linux.
If that doesn't work you can always run the script directly:
We load 3 extra configuration files that are NOT part of this repo:
,vb): Configuration to be set before everything else, this runs before any plugin or any config from this repository.
,vl): Configuration to be set after everything else, this runs after all other configuration is loaded and all plugins are setup.
,vp): Extra plugins to be loaded (along with maybe optional configuration for them). Is loaded after all the default plugins are installed.
A common pattern is for individuals or teams to have those 3 files checked in
to a separate dotfiles repository and have
them be symlinked into your
$HOME directory. Symlink them before you run the
install script and everything should work.
You might want to change some config such as disabling autocompletion or
enabling auto save, or maybe just changing your colorscheme. You can do so by
~/.vimrc.local file, for example:
Enabling auto save:
" will save automatically when leaving the buffer " 0 or 1, defaults 0 let g:autosave = 1
let g:neocomplete#enable_at_startup = 0 " disable neocomplete let g:neocomplcache_enable_at_startup = 0 " disable the fallback version when no LUA
Some configuration values need to be set before loading plugins, for that we
~/.vimrc.local.before, that get's loaded before everything else, one
example usage of it is enabling fancy characters for the airline plugin:
let g:airline_powerline_fonts = 1
If you have a favorite plugin you want to install but couldn't convince me to
add it as a default you can still have it be installed by just putting it in
~/.vimrc.local.plugins, like such:
" Plugin to navigate between camelCase words Plug 'bkad/CamelCaseMotion'
This config packs a considerable amount of plugins, there are descriptions for most of them here in the comments. It also strives to not override default behavior, although that's not always possible.
There's space to write some guides as to how to effectively use this config for certain languages. The main targets are golang and ruby, although this configuration should be usable with most languages.
These bindings are known to be overridden in this config. Please open an issue if you find any other.
|: Default behavior is jump to column. We have it set to
,: Default is reverse repeat a
Tsearch. We have it set to
\: Is the default
<leader>. We have it set to
<cr>: Default behavior is to move the cursor one line down. We have it set to save if modified (basically
:wwhen the file has a change).
A lot of small defaults are overridden everywhere else, and those are just to make editing a better experience and should in no way make this vim not feel like vim. For a glance in some of the changes look at config/basic.vim.
A few overridden are worth mentioning:
These change where new splits are open, when you for example do
default behavior is to open a split on the left, it feels more natural to open
one on the right instead.
Add extra characters that are valid parts of variables.
Default colorscheme: hybrid
Alternate colorscheme: monokai