Update the vim editor configuration.
Submitted by: mat@
This commit is contained in:
parent
723a29825d
commit
7d9b32c439
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=45199
1 changed files with 5 additions and 9 deletions
|
@ -56,14 +56,14 @@ endif " has(autocmd)
|
|||
|
||||
function Set_Highlights()
|
||||
"match ExtraWhitespace /^\s* \s*\|\s\+$/
|
||||
highlight OverLength ctermbg=red ctermfg=white guibg=#592929
|
||||
highlight default link OverLength ErrorMsg
|
||||
match OverLength /\%71v.\+/
|
||||
return 0
|
||||
endfunction
|
||||
|
||||
function ShowSpecial()
|
||||
setlocal list listchars=tab:>>,trail:*,eol:$
|
||||
hi nontext ctermfg=red
|
||||
hi def link nontext ErrorMsg
|
||||
return 0
|
||||
endfunction " ShowSpecial()
|
||||
|
||||
|
@ -80,23 +80,19 @@ function Set_SGML()
|
|||
setlocal autoindent
|
||||
setlocal smartindent
|
||||
" Rewrap paragraphs
|
||||
:map P gqj
|
||||
noremap P gqj
|
||||
" Replace spaces with tabs
|
||||
:map T :s/ /TAB/<CR>
|
||||
noremap T :s/ /\t/<CR>
|
||||
call ShowSpecial()
|
||||
call Set_Highlights()
|
||||
return 0
|
||||
endfunction " Set_SGML()</programlisting>
|
||||
|
||||
<para>Process the file to create embedded tabs:</para>
|
||||
|
||||
<screen>&prompt.user; <userinput>perl -i'' -pe 's/TAB/\t/g' ~/.vimrc</userinput></screen>
|
||||
</sect2>
|
||||
|
||||
<sect2 xml:id="editor-config-vim-use">
|
||||
<title>Use</title>
|
||||
|
||||
<para>Press <keycap>P</keycap> to reformat paragraphs. Press
|
||||
<para>Press <keycap>P</keycap> to reformat paragraphs or text that has been selected in Visual mode. Press
|
||||
<keycap>T</keycap> to replace groups of eight spaces with a
|
||||
tab.</para>
|
||||
</sect2>
|
||||
|
|
Loading…
Reference in a new issue