So, here’s my latest .vimrc file. So far I like it. The statusline is very helpful in letting me know certain things about the file. Like what kid of file it is, character position, where I’m at in the file, and the word count, it’s useful: " Set the maximum width of text to 80 characters set textwidth=80 " Optional: visual indicator for the 80th column set colorcolumn=80 set number " formatoptions settings: " t: Auto-wrap text using textwidth " c: Auto-wrap comments using textwidth " q: Allow formatting of comments with "gq" set formatoptions+=tcq set expandtab " Use spaces instead of tabs set tabstop=4 " Number of spaces that a tab counts for set shiftwidth=4 " Number of spaces to use for each step of (auto)indent set softtabstop=4 " Number of spaces that a tab counts for while performing editing operations syntax enable " Always show the status line set laststatus=2 " Define the format (File pa...
So, here’s my latest .vimrc file. So far I like it. The statusline is very helpful in letting me know certain things about the file. Like what kid of file it is, character position, where I’m at in the file, and the word count, it’s useful:
" Set the maximum width of text to 80 characters
set textwidth=80
" Optional: visual indicator for the 80th column
set colorcolumn=80
set number
" formatoptions settings:
" t: Auto-wrap text using textwidth
" c: Auto-wrap comments using textwidth
" q: Allow formatting of comments with "gq"
set formatoptions+=tcq
set expandtab " Use spaces instead of tabs
set tabstop=4 " Number of spaces that a tab counts for
set shiftwidth=4 " Number of spaces to use for each step of (auto)indent
set softtabstop=4 " Number of spaces that a tab counts for while performing editing operations
syntax enable
" Always show the status line
set laststatus=2
" Define the format (File path, Modified flag, Type, Line/Col, Percentage)
set statusline=%f\ %m\ %y\ %=%l:%c\ %p%%
set statusline+=\ %{wordcount().words}\ words
" Enable spell check
set spell
hi clear SpellBad
hi SpellBad cterm=underline ctermfg=red ctermbg=NONE
" Set style for gVim
hi SpellBad gui=undercurl
So yeah that’s pretty much it. Oh and the spellcheck feature is nice. The blaring red background made it difficult to read at times so I changed it to just be red words and underline when I misspell something. Like I said very helpful.
Comments
Post a Comment