Last active
July 21, 2017 11:08
-
-
Save gcman105/5936bcbfb7c14b5b6d01d37000690441 to your computer and use it in GitHub Desktop.
gcman105's Neovim init file
This file contains hidden or 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
" Specify a directory for plugins | |
" - For Neovim: ~/.local/share/nvim/plugged | |
" - Avoid using standard Vim directory names like 'plugin' | |
"----------------------------------------------------------------------------- | |
" vim-plug plugins {{{1 | |
"----------------------------------------------------------------------------- | |
" Make sure you use single quotes | |
call plug#begin('~/.vim/plugged') | |
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } | |
Plug 'zchee/deoplete-jedi' | |
Plug 'Shougo/deoplete-zsh' | |
Plug 'Shougo/neosnippet.vim' | |
Plug 'Shougo/neosnippet-snippets' | |
Plug 'mattn/emmet-vim' | |
Plug 'tpope/vim-surround' | |
Plug 'tpope/vim-fugitive' | |
Plug 'tpope/vim-vinegar' | |
Plug 'tpope/vim-unimpaired' | |
Plug 'vim-airline/vim-airline' | |
Plug 'vim-airline/vim-airline-themes' | |
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } | |
Plug 'junegunn/fzf.vim' | |
Plug 'frankier/neovim-colors-solarized-truecolor-only' | |
call plug#end() | |
" }}} end of vim-plug plugins ------------------------------------------------ | |
"----------------------------------------------------------------------------- | |
" Settings {{{1 | |
"----------------------------------------------------------------------------- | |
"Want a different map leader than \ | |
let mapleader = "," | |
set incsearch " Set incremental searching" | |
set hlsearch " Highlight searching | |
set cmdheight=2 | |
set autoindent | |
set spelllang=en_gb " Set region to British English | |
" When completing by tag, show the whole tag, not just the function name | |
set showfulltag | |
" I'm happy to type the case of things. I tried the ignorecase, smartcase | |
" thing but it just wasn't working out for me | |
set noignorecase | |
set number " Show lines numbers | |
set relativenumber " Make line numbers relative | |
set laststatus=2 " Always show the status line | |
set clipboard=unnamed | |
set showmatch " Show matching brackets. | |
set splitbelow " More natural split below | |
set splitright " More natural split right | |
set nostartofline " Do not jump to first character with page commands. | |
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 foldlevel=1 " Set the opening fold level | |
set foldmethod=marker | |
set foldopen+=jump | |
set termguicolors | |
set background=dark " or light | |
colorscheme solarized | |
" }}} end of settings -------------------------------------------------------- | |
"----------------------------------------------------------------------------- | |
" Keyboard mapping stuff {{{1 | |
"----------------------------------------------------------------------------- | |
" Map CTRL-E to do what ',' used to do | |
nnoremap <c-e> , | |
vnoremap <c-e> , | |
" Shortcut for editing vimrc file in a new tab | |
nmap <leader>ev :edit $MYVIMRC<CR> | |
nmap <leader>sv :so $MYVIMRC<CR> | |
" Toggle spell checking on and off | |
nmap <silent> <F3> :set spell!<CR> | |
" Map escape key to jj -- much faster | |
imap jj <esc> | |
cmap jj <esc> | |
"Saves time; maps the spacebar to colon | |
nmap <space> : | |
" Press F2 to toggle showing white space on/off | |
nmap <F2> :set list!<CR> | |
" Press F4 to toggle highlighting on/off, and show current value. | |
:noremap <F4> :set hlsearch! hlsearch?<CR> | |
" Insert a hash rocket with <c-l> | |
imap <c-l> <space>=><space> | |
" Align selected lines | |
vnoremap <leader>ib :!align<cr> | |
" Use CTRL-s for saving, also in instert mode | |
noremap <silent> <C-s> :w<CR> | |
inoremap <silent> <C-s> <Esc>:w<CR>a | |
vnoremap <silent> <C-s> <C-c>:update<CR> | |
" }}} end of Keyboard mapping stuff ------------------------------------------ | |
" Airline stuff {{{2 ------------------------------------- | |
let g:airline_powerline_fonts = 1 | |
let g:airline_solarized_bg='dark' | |
" }}} end of Airline stuff ------------------------------- | |
" Disable Python 2 support: | |
let g:loaded_python_provider = 1 | |
let g:python3_host_prog = '/Users/gcman105_mbp/.virtualenvs/py3neovim/bin/python' | |
nnoremap <C-p> :FZF<CR> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment