Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
Thanks to gmax for a list of excellent nodes. Here's my .vimrc:
" I don't want to become awkward when editing on another machine, " so I stick to as few and as highly effective settings as possible. set nocompatible " we want vim, not vi set ruler " display current position in file set backspace=2 " BS and Del in insert mode allowed and go thro +ugh EOLs set number " line numbers set scrolloff=3 set autoindent set noerrorbells if has("gui_running") set guioptions-=f " fork+detach console set guioptions-=t " no menu tear-off colorscheme peachpuff else set background=dark " my console has black bg endif filetype plugin indent on syntax on " Current directory follows the file being edited autocmd BufEnter * lcd %:p:h " [F4] for quick :make noremap <F4> <ESC>:make<C-M> " [F5] toggles error window noremap <F5> <ESC>:cope<C-M> autocmd BufReadPost quickfix noremap <F5> <ESC>:ccl<C-M>:noremap <lt>F +5> <lt>ESC>:cope<lt>C-M><C-M>:echo ":ccl"<C-M> " [Ctrl-PgUp/Dn] to flip through :make errors noremap <C-PageUp> :cp<C-M> noremap <C-PageDown> :cn<C-M> inoremap <C-PageUp> <ESC>:cp<C-M>i inoremap <C-PageDown> <ESC>:cn<C-M>i " save keystrokes on the Perl shebang iabbrev #!p #!/usr/bin/perl -w<C-M>use strict;<C-M><ESC>:filetype dete +ct<C-M>i
These settings, as they should be, are not language specific (except the abbr). Along with this rc, for Perl coding I have a .vim/ftplugin/perl.vim:
" Vim filetype plugin file " Language: Perl " Maintainer: Dan Sharp <vimuser@crosswinds.net> " Last Change: Sun, 19 May 2002 02:07:22 Central European Standard +Time " Changed By: Aristotle Pagaltzis <pagaltzis@gmx.de> if exists("b:did_ftplugin") | finish | endif let b:did_ftplugin = 1 " Set 'formatoptions' to break comment lines but not other lines, " and insert the comment leader when hitting <CR> or using "o". setlocal fo-=t fo+=croql setlocal comments=:# " Make sure the continuation lines below do not cause problems in " compatibility mode. set cpo-=C " Change the browse dialog on Win32 to show mainly Perl-related files if has("gui_win32") && !exists("b:browsefilter") let b:browsefilter = "Perl Source Files (*.pl)\t*.pl\n" . \ "Perl Modules (*.pm)\t*.pm\n" . \ "Perl Documentation Files (*.pod)\t*.pod\n" . \ "All Files (*.*)\t*.*\n" endif " Provided by Ned Konz <ned@bike-nomad.com> "--------------------------------------------- setlocal include=\\<\\(use\|require\\)\\s* setlocal includeexpr=substitute(substitute(v:fname,'::','/','g'),'$',' +.pm','') setlocal isfname=A-Z,a-z,:,48-57,_ setlocal isident=48-57,_,A-Z,a-z setlocal iskeyword=48-57,_,A-Z,a-z,: setlocal define=[^A-Za-z_] " Set this once, globally. if !exists("perlpath") if &shellxquote != '"' let perlpath = system('perl -e "print join(q/,/,@INC)"') else let perlpath = system("perl -e 'print join(q/,/,@INC)'") endif let perlpath = substitute(perlpath,',.$',',,','') endif let &l:path=perlpath setlocal keywordprg=perldoc setlocal makeprg=perl\ -Mstrict\ -wc\ % setlocal errorformat+=%m\ at\ %f\ line\ %l. setlocal grepprg=rgrep\ -n\ -R\ '*.p[ml]'\ $* map <buffer> <C-]> :exec ":tag /".expand("<cword>")
____________
Makeshifts last the longest.

In reply to Re: Vim configs: mine by Aristotle
in thread Vim configs (slightly OT) by djw

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others surveying the Monastery: (2)
    As of 2019-07-21 08:43 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      If you were the first to set foot on the Moon, what would be your epigram?






      Results (7 votes). Check out past polls.

      Notices?