Major vimrc cleanup
- Add comments for uncommented things - Remove ancient pre-vim 7 conditionals - Normalize spacing in sets and lets - Make tabs visible - Change trailing space visibilty from period to floating dot - Tune up ALE python linting with pep8, black, isort
This commit is contained in:
parent
acdd63b433
commit
7d28c9a266
1 changed files with 49 additions and 49 deletions
50
.vimrc
50
.vimrc
|
@ -1,4 +1,4 @@
|
||||||
" Hack my TERM to get around vim ignoring terminfo lol
|
" Hack my TERM to get around vim ignoring terminfo
|
||||||
if &term=="alacritty"
|
if &term=="alacritty"
|
||||||
let &term="xterm-256color"
|
let &term="xterm-256color"
|
||||||
endif
|
endif
|
||||||
|
@ -16,12 +16,8 @@ call vundle#begin()
|
||||||
|
|
||||||
" Plugin execution
|
" Plugin execution
|
||||||
Plugin 'VundleVim/Vundle.vim'
|
Plugin 'VundleVim/Vundle.vim'
|
||||||
|
|
||||||
if v:version >= 704
|
|
||||||
Plugin 'vim-pandoc/vim-pandoc'
|
Plugin 'vim-pandoc/vim-pandoc'
|
||||||
Plugin 'vim-pandoc/vim-pandoc-syntax'
|
Plugin 'vim-pandoc/vim-pandoc-syntax'
|
||||||
endif
|
|
||||||
|
|
||||||
Plugin 'tpope/vim-surround'
|
Plugin 'tpope/vim-surround'
|
||||||
Plugin 'mhinz/vim-startify'
|
Plugin 'mhinz/vim-startify'
|
||||||
Plugin 'vim-airline/vim-airline'
|
Plugin 'vim-airline/vim-airline'
|
||||||
|
@ -36,19 +32,23 @@ filetype plugin indent on
|
||||||
" Formatters for ale to reformat documents into a unified structure
|
" Formatters for ale to reformat documents into a unified structure
|
||||||
let g:ale_fixers={
|
let g:ale_fixers={
|
||||||
\'*': ['remove_trailing_lines', 'trim_whitespace'],
|
\'*': ['remove_trailing_lines', 'trim_whitespace'],
|
||||||
|
\'python': ['autopep8', 'black', 'isort'],
|
||||||
\'elixir': ['mix_format']
|
\'elixir': ['mix_format']
|
||||||
\}
|
\}
|
||||||
|
|
||||||
|
" Set python line length in all the linters/fixers
|
||||||
|
let g:ale_python_pylint_options = '--max-line-length 119'
|
||||||
|
let g:ale_python_autopep8_options = '--max-line-length 119'
|
||||||
|
let g:ale_python_black_options = '-l 119'
|
||||||
|
|
||||||
" Visual themeing
|
" Visual themeing
|
||||||
if exists('+termguicolors')
|
|
||||||
set termguicolors "Enable 256 colors
|
set termguicolors "Enable 256 colors
|
||||||
endif
|
set t_Co=256 "Limit vim to 256 colors
|
||||||
set t_Co=256
|
|
||||||
set scrolloff=5 "Always display 5 lines below cursor when scrolling
|
set scrolloff=5 "Always display 5 lines below cursor when scrolling
|
||||||
colorscheme base16
|
colorscheme base16 "Use my custom built color scheme
|
||||||
let g:airline_theme='base16'
|
let g:airline_theme='base16' "Use the scheme for airline too
|
||||||
set background=dark
|
set background=dark "Inform vim I use a black background terminal
|
||||||
let g:airline_powerline_fonts = 1
|
let g:airline_powerline_fonts=1 "Use powerline glyphs in airline
|
||||||
|
|
||||||
" Set UTF-8 default
|
" Set UTF-8 default
|
||||||
set encoding=utf-8
|
set encoding=utf-8
|
||||||
|
@ -59,22 +59,22 @@ set ttymouse=
|
||||||
|
|
||||||
" Searching Modifications
|
" Searching Modifications
|
||||||
set hlsearch "highlight search matches
|
set hlsearch "highlight search matches
|
||||||
set incsearch
|
set incsearch "enable incremental search
|
||||||
set ignorecase
|
set ignorecase "ignore case in search
|
||||||
set smartcase
|
set smartcase " ...unless you specify case yourself
|
||||||
|
|
||||||
" Tabs and Whitespace
|
" Tabs and Whitespace
|
||||||
if exists('+breakindent')
|
set breakindent "add soft indents when soft wrapping
|
||||||
set breakindent
|
set autoindent "try to figure out automatic indents while writing code
|
||||||
endif
|
set smartindent " ...and try to figure it out based on language
|
||||||
set autoindent
|
set nowrap "don't soft wrap by default
|
||||||
set smartindent
|
|
||||||
set nowrap
|
|
||||||
set tabstop=4
|
set tabstop=4
|
||||||
set shiftwidth=4
|
set shiftwidth=4
|
||||||
set list listchars=tab:\ \ ,trail:.
|
|
||||||
|
|
||||||
" Command completion
|
"display special glyphs for tabs and trailing whitespace
|
||||||
|
set list listchars=tab:»·,trail:·
|
||||||
|
|
||||||
|
" dmenu style command completion
|
||||||
set wildmenu
|
set wildmenu
|
||||||
set wildignorecase
|
set wildignorecase
|
||||||
|
|
||||||
|
@ -101,7 +101,7 @@ let g:pandoc#syntax#conceal#urls = 1
|
||||||
let g:pandoc#hypertext#create_if_no_alternates_exists=1
|
let g:pandoc#hypertext#create_if_no_alternates_exists=1
|
||||||
|
|
||||||
" Make link follows split horizontally since most of my terms are tall
|
" Make link follows split horizontally since most of my terms are tall
|
||||||
" Also work around a netrw bug that opens every no-modify
|
" Also work around a netrw bug that opens everything no-modify
|
||||||
let g:pandoc#hypertext#split_open_cmd="botright split +set\\ modifiable"
|
let g:pandoc#hypertext#split_open_cmd="botright split +set\\ modifiable"
|
||||||
|
|
||||||
" Allow folding at fold markers to let me collapse sub-sections of lists
|
" Allow folding at fold markers to let me collapse sub-sections of lists
|
||||||
|
@ -110,7 +110,7 @@ let g:pandoc#folding#vim_markers_in_comments_only = 0
|
||||||
" Unfold everything by default
|
" Unfold everything by default
|
||||||
set foldlevel=99
|
set foldlevel=99
|
||||||
|
|
||||||
" Bracketed Paste
|
" Bracketed paste
|
||||||
let &t_ti=&t_ti . "\e[?2004h"
|
let &t_ti=&t_ti . "\e[?2004h"
|
||||||
let &t_te="\e[?2004l" . &t_te
|
let &t_te="\e[?2004l" . &t_te
|
||||||
function XTermPasteBegin(ret)
|
function XTermPasteBegin(ret)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue