Created
July 30, 2017 21:10
-
-
Save mmlindeboom/8b66845ec9750e887d8355fedbe0a484 to your computer and use it in GitHub Desktop.
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
call plug#begin('~/.config/nvim/plugged') | |
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } | |
Plug 'junegunn/fzf.vim' | |
Plug 'rking/ag.vim' | |
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' } | |
Plug 'mhartington/oceanic-next' | |
call plug#end() | |
nnoremap <C-p> :FZF<CR> | |
nnoremap <C-n> :NERDTreeToggle<CR> | |
"============== | |
"COMMANDS | |
"============= | |
" Map the leader key to SPACE | |
let mapleader="\<SPACE>" | |
"========== | |
"SETTINGS | |
"========== | |
set showcmd " Show (partial) command in status line. | |
set showmatch " Show matching brackets. | |
set showmode " Show current mode. | |
set ruler " Show the line and column numbers of the cursor. | |
set number " Show the line numbers on the left side. | |
set formatoptions+=o " Continue comment marker in new lines. | |
set textwidth=0 " Hard-wrap long lines as you type them. | |
set expandtab " Insert spaces when TAB is pressed. | |
set tabstop=2 " Render TABs using this many spaces. | |
set shiftwidth=2 " Indentation amount for < and > commands. | |
set noerrorbells " No beeps. | |
set modeline " Enable modeline. | |
set esckeys " Cursor keys in insert mode. | |
set linespace=0 " Set line-spacing to minimum. | |
set nojoinspaces " Prevents inserting two spaces after punctuation on a join (J) | |
" More natural splits | |
set splitbelow " Horizontal split below current. | |
set splitright " Vertical split to right of current. | |
if !&scrolloff | |
set scrolloff=3 " Show next 3 lines while scrolling. | |
endif | |
if !&sidescrolloff | |
set sidescrolloff=5 " Show next 5 columns while side-scrolling. | |
endif | |
set nostartofline " Do not jump to first character with page commands. | |
set ignorecase " Make searching case insensitive | |
set smartcase " ... unless the query has capital letters. | |
set gdefault " Use 'g' flag by default with :s/foo/bar/. | |
set magic " Use 'magic' patterns (extended regular expressions). | |
" Use <C-L> to clear the highlighting of :set hlsearch. | |
if maparg('<C-L>', 'n') ==# '' | |
nnoremap <silent> <C-L> :nohlsearch<CR><C-L> | |
endif | |
" Search and Replace | |
nmap <Leader>s :%s//g<Left><Left> | |
"========== | |
"THEMES | |
"========== | |
" For Neovim 0.1.3 and 0.1.4 | |
let $NVIM_TUI_ENABLE_TRUE_COLOR=1 | |
" Or if you have Neovim >= 0.1.5 | |
if (has("termguicolors")) | |
set termguicolors | |
endif | |
" Theme | |
syntax enable | |
colorscheme OceanicNext |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment