Clean up and tweak line wrapping

This commit is contained in:
Anthony Rose 2022-06-22 14:43:01 +00:00
parent 8fb5898237
commit 58d74381f7

42
vimrc
View file

@ -1,24 +1,23 @@
" Anthony Perkins " Anthony Perkins https://git.acperkins.com/acp/vimfiles
" https://git.acperkins.com/acp/vimfiles
" "
" Distributed under the VIM license. See ':help license' for a copy. " Distributed under the VIM license. See ':help license' for a copy. Files
" Files under pack/ and coc/extensions/node_modules/ have their own licenses. " under pack/ and coc/extensions/node_modules/ have their own licenses.
" "
" Includes parts from Tim Pope's «sensible.vim» " Includes parts from Tim Pope's «sensible.vim»
" <https://github.com/tpope/vim-sensible>. " <https://github.com/tpope/vim-sensible>.
"============================================================================= "===============================================================================
" Set this first to avoid overwriting later settings. " Set this first to avoid overwriting later settings.
set nocompatible set nocompatible
"============================================================================= "===============================================================================
" Load Pathogen if Vim does not support packages. " Load Pathogen if Vim does not support packages.
if !has('packages') if !has('packages')
runtime pack/acp/opt/vim-pathogen/autoload/pathogen.vim runtime pack/acp/opt/vim-pathogen/autoload/pathogen.vim
execute pathogen#infect('pack/acp/start/{}') execute pathogen#infect('pack/acp/start/{}')
endif endif
"============================================================================= "===============================================================================
" General settings for all builds. " General settings for all builds.
" Set colour levels for different terminals. " Set colour levels for different terminals.
@ -47,10 +46,10 @@ nnoremap gb :bnext<CR>
" Text wrapping and margin settings. Setting tw=72 is ideal for emails or " Text wrapping and margin settings. Setting tw=72 is ideal for emails or
" anything that will be read in a Terminal, while tw=100 is better for code or " anything that will be read in a Terminal, while tw=100 is better for code or
" for general text that will be viewed in a GUI. If printing, an A4-sized " for general text that will be viewed in a GUI. If printing, an A4-sized page
" page should fit 100 columns at 8pt or 80 columns at 10pt, in Courier or " should fit 100 columns at 8pt or 80 columns at 10pt, in Courier or Liberation
" Liberation Mono fonts. " Mono fonts.
set colorcolumn=81 " Suggestions: 73, 81, 101 set colorcolumn=73,81 " Suggestions: 73, 81, 101
set textwidth=80 " Suggestions: 72, 80, 100 set textwidth=80 " Suggestions: 72, 80, 100
" All other settings. " All other settings.
@ -59,7 +58,6 @@ set autoread
set background=dark set background=dark
set backspace=indent,eol,start set backspace=indent,eol,start
set cmdheight=1 set cmdheight=1
set colorcolumn=73,81
set directory=$TEMP//,/tmp//,. set directory=$TEMP//,/tmp//,.
set display+=lastline set display+=lastline
set encoding=utf-8 set encoding=utf-8
@ -95,13 +93,13 @@ set ttyfast
set updatetime=300 set updatetime=300
set wrap set wrap
"============================================================================= "===============================================================================
" General settings for non-minimal Vim builds. " General settings for non-minimal Vim builds.
if has('eval') if has('eval')
" Protect commands that are only available when +eval is enabled. " Protect commands that are only available when +eval is enabled.
" Technically only 'if 1' would be required, as 'has()' is provided " Technically only 'if 1' would be required, as 'has()' is provided by
" by +eval, but this is clearer. " +eval, but this is clearer.
command Q q command Q q
command W w command W w
command WQ wq command WQ wq
@ -127,7 +125,7 @@ if has('eval')
colorscheme tempus_night colorscheme tempus_night
endif endif
"============================================================================= "===============================================================================
" Settings based on feature detection. " Settings based on feature detection.
if has('autocmd') if has('autocmd')
@ -161,10 +159,6 @@ if has('gui_running')
set guioptions-=T set guioptions-=T
set guioptions-=f set guioptions-=f
set lines=43 set lines=43
"
" Set theme for GUI.
"set background=light
"colorscheme tempus_totus
endif endif
if has('patch-7.3.541') if has('patch-7.3.541')
@ -227,15 +221,17 @@ endif
" Customise colour schemes. Keep this near the end. " Customise colour schemes. Keep this near the end.
if &background ==# 'light' if &background ==# 'light'
highlight SpecialKey ctermfg=lightgray ctermbg=NONE guifg=lightgray guibg=NONE highlight SpecialKey ctermfg=lightgray ctermbg=NONE
\ guifg=lightgray guibg=NONE
else else
highlight SpecialKey ctermfg=darkgray ctermbg=NONE guifg=darkgray guibg=NONE highlight SpecialKey ctermfg=darkgray ctermbg=NONE
\ guifg=darkgray guibg=NONE
endif endif
highlight ColorColumn ctermfg=NONE guifg=NONE highlight ColorColumn ctermfg=NONE guifg=NONE
" Keep this as the last config line in the file. " Keep this as the last config line in the file.
runtime vimrc.local runtime vimrc.local
"============================================================================= "===============================================================================
" End of config file. " End of config file.
" vim:set ft=vim: " vim:set ft=vim: