FreeBSD Bugzilla – Attachment 143884 Details for
Bug 191137
Replace Documentation Project Primer ~/.vimrc with a working configuration
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
vimrc example
vimrc.txt (text/plain), 2.00 KB, created by
Sevan Janiyan
on 2014-06-17 23:43:27 UTC
(
hide
)
Description:
vimrc example
Filename:
MIME Type:
Creator:
Sevan Janiyan
Created:
2014-06-17 23:43:27 UTC
Size:
2.00 KB
patch
obsolete
>Index: en_US.ISO8859-1/books/fdp-primer/editor-config/chapter.xml >=================================================================== >--- en_US.ISO8859-1/books/fdp-primer/editor-config/chapter.xml (revision 45070) >+++ en_US.ISO8859-1/books/fdp-primer/editor-config/chapter.xml (working copy) >@@ -43,15 +43,45 @@ > <para>Edit <filename>~/.vimrc</filename>, adding these > lines:</para> > >- <programlisting>augroup sgmledit >- autocmd FileType sgml set formatoptions=cq2l " Special formatting options >- autocmd FileType sgml set textwidth=70 " Wrap lines at 70 columns >- autocmd FileType sgml set shiftwidth=2 " Automatically indent >- autocmd FileType sgml set softtabstop=2 " Tab key indents 2 spaces >- autocmd FileType sgml set tabstop=8 " Replace 8 spaces with a tab >- autocmd FileType sgml set autoindent " Automatic indentation >-augroup END</programlisting> >+ <programlisting>if has("autocmd") >+ au BufNewFile,BufRead *.sgml,*.ent,*.xsl,*.xml call Set_SGML() >+ au BufNewFile,BufRead *.[1-9] call ShowSpecial() >+endif " has(autocmd) > >+function Set_Highlights() >+ "match ExtraWhitespace /^\s* \s*\|\s\+$/ >+ highlight OverLength ctermbg=red ctermfg=white guibg=#592929 >+ match OverLength /\%71v.\+/ >+ return 0 >+endfunction >+ >+function ShowSpecial() >+ setlocal list listchars=tab:>>,trail:*,eol:$ >+ hi nontext ctermfg=red >+ return 0 >+endfunction " ShowSpecial() >+ >+function Set_SGML() >+ setlocal number >+ syn match sgmlSpecial "&[^;]*;" >+ setlocal syntax=sgml >+ setlocal filetype=xml >+ setlocal shiftwidth=2 >+ setlocal textwidth=70 >+ setlocal tabstop=8 >+ setlocal softtabstop=2 >+ setlocal formatprg="fmt -p" >+ setlocal autoindent >+ setlocal smartindent >+ " Rewrap paragraphs >+ :map P gqj >+ " Replace spaces with tabs >+ :map T :s/ / /<CR> >+ call ShowSpecial() >+ call Set_Highlights() >+ return 0 >+endfunction " Set_SGML()</programlisting> >+ > </sect1> > > <sect1 xml:id="editor-config-emacs">
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 191137
: 143884