Another Vim config. Insane enough to be mine.
bash -c "`curl -fsSL https://raw.github.com/vitalk/sanevi/master/install.sh`"
-
Clone repository onto your machine
git clone https://github.com/vitalk/sanevi ~/.vim
-
Install the Vim plugin manager, e.g. download Plug and put it in
~/.vim/autoload
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
-
Create symlink for
.vimrc
in your home directoryln -s ~/.vim/vimrc ~/.vimrc
-
Create symlink for
.ctags
in your home directoryln -s ~/.vim/ctags ~/.ctags
-
Install the plugins in use
vim +PlugInstall +qall
Put your customization in ~/.vimrc.local
. This config overrides the global
one.
For example, your config might look like this:
colorscheme solarized
set backgroud=dark
augroup ft_vim_anywhere
au!
au BufNewFile,BufRead **/vim-anywhere/doc-** setl ft=markdown
augroup END
- Manage plugins via Plug.
- Use Ctrl-P for fuzzy file/buffer/tag finding.
- Use ripgrep code searcher instead of
grep
when available. - Asynchronous code-linting via ALE.
- Code-completion via YCM.
- Syntax highlighting for Markdown, JavaScript, CoffeeScript, Jinja, Less, Ansible, and HTML.
All git-related mappings are start with the (git)
prefix which, by default,
mapped to space+g combination.
Key | Description |
---|---|
(git)it |
Start a git command |
(git)s |
Bring up the output of git status in the preview window |
(git)co |
Record changes to the repository |
(git)ca |
Rewrite HEAD commit |
(git)ap |
Interactively choose hunks of path between the index and the work tree and add them to the index |
(git)d |
Perform a vimdiff against the current file in the given revision |
(git)ri |
Start interactive rebase in the current branch |
(git)re |
Happy grepping in repository |
(git)l |
Load all previous revisions of the current file into the quickfix list |
(git)b |
Run git-blame on the file and open the results in a scroll bound vertical split |
(git)w |
Write to the current file’s path, stage the results and reload buffer (to ensure the git gutter is updated) |
(git)r |
Checkout the current file’s path |
(git)ss |
Stash the changes in a dirty working directory away |
(git)sp |
Pop stashed changes back |
(git)pu |
Start git push command |
(git)pl |
Start git pull command |
- Convert the line under cursor into appropriate markdown header via the leader+1-6 combinations;
- Open fenced code block into separate buffer (with appropriate filetype, syntax highlighting and snippets) via the shift+e;
- A sane and useful mappings to create and manage task lists.
Distributed under the MIT license.
© 2016-2024 by Vital Kudzelka. Use it for Good not Evil.