Skip to content

shayh/dotneovim

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

My Neovim setup

My Neovim IDE setup for Python, Go, Rust, HTML, CSS, Javascript, Typescript, gettext and more.

Features

  • init.vim handling
  • Incremental and smart case search.
  • Sublime Text style multiple selections
  • Trailing whitespace highlighting and cleaning shortcut
  • Logical and Visual layout (for Right-To-Left lanaguegs) editing.
  • Tabs expand to 4 spaces by default
  • Remap <Leader> to <SPACE> and jj to <ESC>
  • Highlight current row and color column 80
  • 70+ language packs support
  • Syntax checking
  • Snippets
  • Quotes, parens etc pair, surround
  • Extended pair matching with %
  • ASCII drawing
  • Fuzzy file, buffer, mru, tag, etc finder
  • VCS plugins (Fugitive, Lawrencium)
  • Tab completion
  • Commenting

Prerequisites

  • Neovim and Neovim Python client.
  • For faster search, ripgrep
  • For tags: ctags
  • For devicons, a patched font, like the one from nerd-fonts

Usage

The following commands will clone the repo, and install vim-plug plugin manager:

mkdir -p ~/.config/nvim
git clone https://github.com/MeirKriheli/dotneovim.git ~/.config/nvim
curl -fLo ~/.config/nvim/autoload/plug.vim --create-dirs \
    https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim

Install plugins from the command line:

nvim +PlugUpdate +qa

Go tags

For CtrlPBufTag search in go files, make sure you have an updated version of ctags (>=5.8) and put in your ~/.ctags::

--langdef=Go
--langmap=Go:.go
--regex-Go=/func([ \t]+\([^)]+\))?[ \t]+([a-zA-Z0-9_]+)/\2/f,func/
--regex-Go=/var[ \t]+([a-zA-Z_][a-zA-Z0-9_]+)/\1/v,var/
--regex-Go=/type[ \t]+([a-zA-Z_][a-zA-Z0-9_]+)/\1/t,type/

Overrides

  • ~/.config/nvim/before.vim, if exists, is sourced before everything allowing definitions of variables to act upon.
  • ~/.config/nvim/after.vim if exists, is sourced after all the files in ~/.config/nvim/rc.d allowing override of default settings (e.g: color schemes, plugin configuration, etc.).

Plugins

  • Solarized - color scheme
  • base16-vim - color scheme
  • vim-molokai - color scheme
  • Deoplete - Dark powered asynchronous completion framework for Neovim
  • Fugitive - a Git wrapper so awesome, it should be illegal
  • gv.vim - A git commit browser in Vim
  • Lawrencium - Mercurial wrapper for Vim, inspired by Tim Pope's Fugitive
  • ctrlp.vim - Fuzzy file, buffer, mru, tag, etc finder
  • ale - Asynchronous Lint Engine
  • UltiSnips - The ultimate snippet solution for Vim.
  • vim-snippets - vim-snipmate default snippets
  • python-mode - Vim python-mode. PyLint, Rope, Pydoc, breakpoints from box
  • vim-go - Go development plugin for Vim
  • rust.vim - provides Rust file detection, syntax highlighting, formatting, Syntastic integration, and more.
  • DrawIt - ASCII drawing plugin: lines, ellipses, arrows, fills, and more!
  • vim-surround - quoting/parenthesizing made simple
  • Shebang - Make executable by setting the correct shebang and executable bit
  • Tagbar - Displays tags in a window, ordered by class etc.
  • NERD tree - A tree explorer
  • nerdtree-git-plugin - A plugin of NERDTree showing git status
  • auto-pairs - Insert or delete brackets, parens, quotes in pair
  • po.vim - Easier editing of GNU gettext PO files
  • MatchTagAlways - A Vim plugin that always highlights the enclosing html/xml tags
  • vim-airline - Light weight status line utility
  • tabular - text filtering and alignment
  • tcomment_vim - An extensible & universal comment vim-plugin that also handles embedded filetypes
  • vim-unimpaired - pairs of handy bracket mappings
  • vim-multiple-cursors - True Sublime Text style multiple selections for Vim
  • splitjoin.vim - A Vim plugin that simplifies the transition between multiline and single-line code
  • vim-repeat - enable repeating supported plugin maps with "."
  • tsuquyomi - A Vim plugin for TypeScript

Shortcuts and re-Mappings

Key Command
jj <Esc> in insert and command modes
<SPACE> <Leader>
<Leader>v Load .vimrc
<Leader>V Activate changes to .vimrc (Make sure to save it before)
<F2> Close current split (window)
<F3> Toggle NERD tree
<F5> Toggle Tagbar
<Leader>S Remove trailing whitespace
<CTRL>hjkl Window movement commands
<CTRL>arrow Window movement commands
<Leader>d Delete buffer, keep the split
-, + Resize horizontal splits
<ALT>< <ALT>> Resize vertical splits
<F9> Toggle logical (RTL, e.g: Hebrew) editing
<F8> Toggle visual (RTL, e.g: Hebrew) editing
g/ :grep!
g* :grep! -w current_word
ga :grepadd! (add results to the current search)
gr :CtrlPBufTag (fuzzy tag search in current file)

Virtualenv settings

If you're running from virtualenv activated, make sure to point nvim and ale to correct locations. By default, settings are:

let g:python3_host_prog = '/usr/bin/python'
let g:ale_python_flake8_executable = '/usr/bin/flake8'

If needed, override those settings to the locations on your machine.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Vim Script 83.4%
  • Shell 16.6%