Skip to content

Instantly share code, notes, and snippets.

@helloworld12321
Last active August 19, 2022 01:41
Show Gist options
  • Save helloworld12321/8460af45ba9255cd762e5b2c40a788cf to your computer and use it in GitHub Desktop.
Save helloworld12321/8460af45ba9255cd762e5b2c40a788cf to your computer and use it in GitHub Desktop.
RC files for Vim and Neovim
" === Basic functionality ===
syntax on
set number
set colorcolumn=81
set expandtab
set shiftwidth=2
set splitright
set splitbelow
" Remove trailing whitespace
autocmd BufWritePre * %s/\s\+$//e
" Workaround for https://github.com/vim/vim/issues/7280
set regexpengine=0
" === Aesthetics ===
" (255 is a very light grey; 75 is a steel blue.)
highlight ColorColumn ctermbg=255
highlight LineNr ctermfg=75
" === Plugins ===
" (Other configuration files can customize this section by setting certain
" global variables.)
if exists('g:pluggedDirectory')
call plug#begin(g:pluggedDirectory)
else
call plug#begin('~/.vim/plugged')
endif
Plug 'editorconfig/editorconfig-vim'
Plug 'leafgarland/typescript-vim'
Plug 'sersorrel/vim-lilypond'
Plug 'Vimjas/vim-python-pep8-indent'
Plug 'tpope/vim-sensible'
" Allow other configuration files to source this one and add extra plugins.
if exists('g:extendedPlugins')
for plugin in g:extendedPlugins
Plug plugin
endfor
endif
call plug#end()
" The vim-sensible plugin sets the hlsearch option, which I don't actually
" like.
set nohlsearch
let g:pluggedDirectory = '~/.local/share/nvim/plugged'
let g:extendedPlugins = ['floobits/floobits-neovim']
source ~/.vimrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment