Last active
August 31, 2018 18:18
-
-
Save jaimerson/25f2d53f82dc611d030174af44c2e18f to your computer and use it in GitHub Desktop.
My nvim config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set number | |
set ruler | |
set hidden | |
set hlsearch " highlight search terms | |
set incsearch " show search matches as you type | |
set history=1000 " remember more commands and search history | |
set undolevels=1000 " use many muchos levels of undo | |
set wildignore=*.swp,*.bak,*.pyc,*.class | |
set title " change the terminal's title | |
set visualbell " don't beep | |
set noerrorbells " don't beep | |
set nobackup | |
set noswapfile | |
set pastetoggle=<F2> | |
set list | |
set listchars=tab:▸\ | |
set expandtab | |
set tabstop=2 | |
set shiftwidth=2 | |
set smarttab | |
set list lcs=trail:·,tab:»· | |
set guicursor= | |
" Workaround some broken plugins which set guicursor indiscriminately. | |
autocmd OptionSet guicursor noautocmd set guicursor= | |
" Only wrap on markdown | |
autocmd FileType * set nowrap | |
autocmd FileType markdown set wrap | |
" Colors | |
syntax on | |
" stay in the middle of screen | |
set so=999 | |
let mapleader="," | |
nnoremap ; : | |
nnoremap ss :split<CR> | |
nnoremap vv :vsplit<CR> | |
nnoremap // :noh<CR> | |
nnoremap <Leader>t :CtrlP<CR> | |
nnoremap <Leader>b :CtrlPBuffer<CR> | |
nnoremap <Leader>r :source ~/.config/nvim/init.vim<CR> | |
nnoremap <Leader>n :NERDTreeToggle<CR> | |
nnoremap <Leader><Left> :tabprevious<CR> | |
nnoremap <Leader><Right> :tabNext<CR> | |
nnoremap <Leader>N :tabedit<CR> | |
" Press F4 to insert binding.pry | |
nnoremap <F4> "='require "pry";binding.pry'<CR>P | |
inoremap <F4> <C-R>='require "pry";binding.pry'<CR> | |
" Press F5 to insert current timestamp | |
nnoremap <F5> "=strftime("%c")<CR>P | |
inoremap <F5> <C-R>=strftime("%c")<CR> | |
" Press F6 to insert shrug | |
nnoremap <F6> "='¯\_(ツ)_/¯'<CR>P | |
inoremap <F6> <C-R>='¯\_(ツ)_/¯'<CR> | |
" Map // to search for selected text in visual mode | |
vnoremap // y/<C-R>"<CR> | |
set wildignore+=*/tmp/*,*.so,*.swp,*.zip,*/node_modules/*,*/node_shrinkwrap/* | |
call plug#begin('~/.vim/plugged') | |
Plug 'editorconfig/editorconfig-vim' | |
Plug 'junegunn/vim-easy-align' | |
Plug 'scrooloose/nerdtree' | |
Plug 'ctrlpvim/ctrlp.vim' | |
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } | |
Plug 'fishbullet/deoplete-ruby' | |
Plug 'ervandew/supertab' | |
Plug 'tpope/vim-rails' | |
Plug 'jiangmiao/auto-pairs' | |
Plug 'tpope/vim-endwise' | |
Plug 'fatih/vim-go' | |
Plug 'slim-template/vim-slim' | |
Plug 'dracula/vim' | |
Plug 'mhinz/vim-signify' | |
call plug#end() | |
" Plugin configs | |
let g:ctrlp_max_files=0 | |
let g:ctrlp_max_depth=40 | |
let g:ctrlp_show_hidden=1 | |
set wildignore+=*/tmp/*,*/log/*,*.so,*.swp,*.zip |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment