Skip to content

Instantly share code, notes, and snippets.

@jsimmons
Created March 28, 2019 20:10
Show Gist options
  • Save jsimmons/c3ed793bdb22761a7312a49869d1ac49 to your computer and use it in GitHub Desktop.
Save jsimmons/c3ed793bdb22761a7312a49869d1ac49 to your computer and use it in GitHub Desktop.
let mapleader=","
" Specify a directory for plugins
" - For Neovim: ~/.local/share/nvim/plugged
" - Avoid using standard Vim directory names like 'plugin'
call plug#begin('~/.local/share/nvim/plugged')
Plug 'godlygeek/tabular'
Plug 'rust-lang/rust.vim'
Plug 'ctrlpvim/ctrlp.vim'
Plug 'scrooloose/syntastic'
Plug 'tpope/vim-surround'
Plug 'tpope/vim-fugitive'
Plug 'vim-airline/vim-airline'
Plug 'sickill/vim-monokai'
Plug 'Valloric/YouCompleteMe', { 'do': './install.py --clangd-completer --rust-completer' }
" Initialize plugin system
call plug#end()
" Syntastic
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0
set nowrap
set tabstop=4
set shiftwidth=4
set softtabstop=4
set expandtab
set number
set cursorline
set showcmd
syntax enable
colorscheme monokai
set cc=81
set incsearch
set hlsearch
set ignorecase
set smartcase
set scrolloff=3
set nobackup
set noswapfile
set laststatus=2
set wildignore+=*/.git/*,*/.tup/*,*/.hg/*,*/.svn/*,*.so,*.o,*.pyc
let g:ctrlp_user_command = ['.git/', 'git --git-dir=%s/.git ls-files -oc --exclude-standard']
set list listchars=tab:→\ ,trail:·
set guifont=Fira\ Code:h12
nnoremap <leader>gg :YcmCompleter GoToDefinitionElseDeclaration<CR>
nnoremap <leader>gl :YcmCompleter GoToDeclaration<CR>
nnoremap <leader>gf :YcmCompleter GoToDefinition<CR>
nnoremap <up> <nop>
nnoremap <down> <nop>
nnoremap <left> <nop>
nnoremap <right> <nop>
inoremap <up> <nop>
inoremap <down> <nop>
inoremap <left> <nop>
inoremap <right> <nop>
" " Copy to clipboard
vnoremap <leader>y "+y
nnoremap <leader>Y "+yg_
nnoremap <leader>y "+y
nnoremap <leader>yy "+yy
" " Paste from clipboard
nnoremap <leader>p "+p
nnoremap <leader>P "+P
vnoremap <leader>p "+p
vnoremap <leader>P "+P
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment