Move colorcolumn into exec section
This commit is contained in:
parent
4aad9e5e6a
commit
4d4d502035
1 changed files with 12 additions and 13 deletions
25
vimrc
25
vimrc
|
@ -67,19 +67,6 @@ map <S-ScrollWheelUp> <C-Y>
|
|||
map <ScrollWheelDown> 3<C-E>
|
||||
map <ScrollWheelUp> 3<C-Y>
|
||||
|
||||
" 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
|
||||
" for general text that will be viewed in a GUI. If printing, an A4-sized page
|
||||
" should fit 100 columns at 8pt or 80 columns at 10pt, in Courier or Liberation
|
||||
" Mono fonts.
|
||||
"
|
||||
" You can highlight line-end columns with colorcolumn (cc), which should be one
|
||||
" larger than the textwidth. E.g. to include a 'margin-bell' line also:
|
||||
" set tw=80 cc=73,81
|
||||
" Clear the colorcolumn highlighting with cc=0.
|
||||
set textwidth=80 " Suggestions: 72, 80, 100
|
||||
execute "set colorcolumn=" . (&textwidth + 1)
|
||||
|
||||
" All other settings.
|
||||
set autoindent
|
||||
set autoread
|
||||
|
@ -147,6 +134,18 @@ if has('eval')
|
|||
let loaded_netrw=1
|
||||
let loaded_netrwPlugin=1
|
||||
|
||||
" 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 for general text that will be viewed in a GUI. If printing, an A4-sized
|
||||
" page should fit 100 columns at 8pt or 80 columns at 10pt, in Courier or
|
||||
" Liberation Mono fonts.
|
||||
"
|
||||
" You can highlight line-end columns with colorcolumn (cc), which should be
|
||||
" one larger than the textwidth. E.g. to include a 'margin-bell' line also:
|
||||
" set tw=80 cc=73,81 Clear the colorcolumn highlighting with cc=0.
|
||||
set textwidth=80 " Suggestions: 72, 80, 100
|
||||
execute "set colorcolumn=" . (&textwidth + 1)
|
||||
|
||||
function! ACPToggleMargins()
|
||||
execute "set textwidth=" . (&textwidth == "80" ? "72" : (&textwidth == "72" ? "100" : "80"))
|
||||
execute "set colorcolumn=" . (&textwidth + 1)
|
||||
|
|
Loading…
Reference in a new issue