Skip to content

vitalk/sanevi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vim config

Another Vim config. Insane enough to be mine.

Installation

For lazy people

bash -c "`curl -fsSL https://raw.github.com/vitalk/sanevi/master/install.sh`"

For those who actually care about what is done

  • 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 directory

    ln -s ~/.vim/vimrc ~/.vimrc
  • Create symlink for .ctags in your home directory

    ln -s ~/.vim/ctags ~/.ctags
  • Install the plugins in use

    vim +PlugInstall +qall

Customization

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

Features

Git goodness

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

Markdown goodness

  • 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.

License

Distributed under the MIT license.

© 2016-2024 by Vital Kudzelka. Use it for Good not Evil.

About

Vim config. Insane enough to be mine

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published