比较强的vimrc文件

本文详细介绍了一套全面的Vim配置方案,包括颜色、字体设置、文件格式处理、用户界面定制等内容。此外还提供了丰富的自动命令、括号展开、缩进、拼写检查等编辑功能,并介绍了多种插件配置及特定语言如Python、JavaScript的支持。





http://amix.dk/

 
 
 

 

General
Colors and Fonts
Fileformats
VIM userinterface
Statusline
Visual
Moving around and tabs
General Autocommands
Parenthesis/bracket expanding
General Abbrevs
Editing mappings etc.
Command-line config
Buffer realted
Files and backups
Folding
Text options
Indent
Spell checking
Plugin configuration
Yank ring
File explorer
Minibuffer
Tag list (ctags) - not used
LaTeX Suite things
Filetype generic
Todo
VIM
HTML related
Ruby & PHP section
Python section
Cheetah section
Vim section
Java section
JavaScript section
C mappings
SML
Scheme bindings
Snippets
Python
javaScript
Cope
MISC

  


  






General


 


 =400


  
  


 


 =a


 mapleader  
 g:leader = ","


 w :w!
 f :find


 s :source ~/vim_local/vimrc

 e :e! ~/vim_local/vimrc

!  vimrc  ~/vim_local/vimrc



Colors and Fonts


 


 MySys  
   =Bitstream/ Vera/ Sans/ Monoh14
   
   =macroman
 MySys  
   =Monospace/ 11


 
   -=T
   psc_style
   ps_color

   =dark
   zellner



 1 :set syntax=cheetah
 2 :set syntax=xhtml
 3 :set syntax=python
 4 :set ft=javascript
 $ :syntax sync fromstart

  * :  


 
   
   cursorline =
   CursorColumn =



 Pmenu =
 PmenuSel = =



Fileformats


 =unixdosmac

 fd :se ff=dos
 fu :se ff=unix




VIM userinterface


 =7


 


 


 =2


 


 


 


 =eolstartindent


 +=hl


 
 


 


 
 
 =


 


 =2


 


Statusline


   =2

  ! CurDir
      curdir  getcwd, , , 
      curdir
  


   =/ %F%m%r%h/ %w/ / CWD/ %r%{CurDir()}%h/ / / Line/ %l/%L%c




Visual


! VisualSearchdirection range
   l:saved_reg  
   
   l:pattern  , 
   l:pattern  l:pattern, , , 
   a:direction  
       l:pattern  
  
       l:pattern  
  
   @/  l:pattern
     l:saved_reg



  * :call VisualSearch('f')
  # :call VisualSearch('b')



Moving around and tabs


  /
  ?


  j
  k
  h
  l



 bd :Bclose
  <leader>bd

  :bn
  :bp


 tn :tabnew %
 te :tabedit
 tc :tabclose
 tm :tabmove

   =usetab
   =2




  $a
  0i
 <D-___FCKpd___0gt; $a
 <D-0> 0i



General Autocommands


 cd :cd %:p:h



Parenthesis/bracket expanding

 $1 `>a)`<i(

 $2 `>a]`<i[
 $3 `>a}`<i{
 $ `>a"`<i"
 $q `>a'`<i'
 $w `>a"`<i"


 $1 ():let leavechar=")"i
 $2 []:let leavechar="]"i
 $4 {o}:let leavechar="}"O
 $3 {}:let leavechar="}"i
 $q '':let leavechar="'"i
 $w "":let leavechar='"'i
 , *./(vim/)/@!  " "":let leavechar='"'i
 , *./(txt/)/@!  ' '':let leavechar="'"i

  :exec "normal f" . leavechara
 <d-l> :exec "normal f" . leavechara



General Abbrevs


 xdate =
 xname Amir Salihefendic



Editing mappings etc.


 0 ^


  mz:m+`z
  mz:m-2`z
  :m'>+`<my`>mzgv`yo`z
  :m'<-2`>my`<mzgv`yo`z

 MySys  
   <D-j> 
   <D-k> 
   <D-j> 
   <D-k> 


! DeleteTrailingWS
   
  /s/+$
   

  *.py : DeleteTrailingWS

 =menu


Command-line config

! Cwd
   cwd  
   


! DeleteTillSlash
   g:cmd  
   MySys    MySys  
     g:cmd_edited  g:cmd, , , 
  
     g:cmd_edited  g:cmd, , , 
  
   g:cmd  g:cmd_edited
     MySys    MySys  
       g:cmd_edited  g:cmd, , , 
    
       g:cmd_edited  g:cmd, , , 
    
  
   g:cmd_edited


! CurrentFileDircmd
   a:cmd      



 $h e ~/
 $d e ~/Desktop/
 $j e ./

 $q eDeleteTillSlash()

 $c e eCurrentFileDir("e")

 $tc eCurrentFileDir("tabnew")
 $th tabnew ~/
 $td tabnew ~/Desktop/


     
     
     



Buffer realted


  :sb


 q :e ~/buffer


 ='10/"10020%n~/.viminfo
  *    |   || |


  ggVGg?


! Bclose  BufcloseCloseIt()

! BufcloseCloseIt
    l:currentBufNum  
    l:alternateBufNum  

    l:alternateBufNum
      #
   
     
   

      l:currentBufNum
     
   

    l:currentBufNum
     l:currentBufNum
   




Files and backups


 
 
 



Folding


 
 =0



Text options

 
 =2

 t2 :set shiftwidth=2
 t4 :set shiftwidth=4
  html,python,vim,javascript  =2
  html,python,vim,javascript  =2
  java  =4
  java  =4

 
 
 =500


Indent


    


    


    


    



Spell checking

 sn ]s
 sp [s
 sa zg
 s? z=



Plugin configuration


Vim Grep

    Grep_Skip_Dirs  
    Grep_Cygwin_Find  


Yank Ring

    y :YRShow


File explorer


    g:explVertical


    g:explWinSize

    g:explSplitLeft
    g:explSplitBelow


    g:explHideFiles  g:explDetailedHelp  Minibuffer   g:miniBufExplModSelTarget    g:miniBufExplorerMoreThanOne    g:miniBufExplModSelTarget    g:miniBufExplUseSingleClick    g:miniBufExplMapWindowNavVim    g:miniBufExplVSplit    g:miniBufExplSplitBelow  g:bufExplorerSortBy    , :call UMiniBufExplorer  Tag list (ctags) - not used       LaTeX Suite things   =grep/ -nH/ $*  g:Tex_DefaultTargetFormat  g:Tex_ViewRule_pdf    tex   :w! :silent! call Tex_RunLaTeX()    tex  $i /indent   tex  $* /cdot   tex  $i /item   tex  $m /[/]O  Filetype generic   Todo   , *.todo  ~/vim_local//amido  VIM    vim    :w!:source %  HTML related    xml_use_xhtml      html_use_css    html_number_lines    use_xhtml    Ruby & PHP section    ruby    :w!:!ruby %   php  php   php    <leader>cd:w:make %  Python section     python  ~/vim_local//   python    :w!:!python %   python  ~/vim_local/plugin/python_fold    python  makeprg/ / /"import/ py_compile,sys;/ sysstderrsysstdout;/ py_compiler'%/"   python  =%C/ %.%#%A/ / File/ /"%f/"/// line/ %l%.%#%Z%[%^/ ]%//@=%m    python     python   $r return   python   $s self   python   $c ####kla   python   $i import   python   $p print   python   $d """"""O  ! Python_Eval_VSplit range  src    dst      a:firstline    a:lastline    src    src    dst    dst    python   :call Python_Eval_VSplit()  Cheetah section    cheetah  =xml   cheetah  =cheetah  Vim section    vim    Java section    java    System.out.println();hi    java  ~/vim_local/macros/jcommenter   java  b:jcommenter_class_author   java  b:jcommenter_file_author   java    :call JCommentWriter()    java   $pr private   java   $r return   java   $pu public   java   $i import   java   $b boolean   java   $v void   java   $s String  ! JavaFold  =syntax  =1   foldBraces = =       foldImports    ! FoldText  getlinev:foldstart, , ,    =FoldText()    java  JavaFold   java     *.sablecc,*.scc  =sablecc  JavaScript section    javascript  ~/vim_local//javascript ! JavaScriptFold  =syntax  =1   foldBraces = =     ! FoldText  getlinev:foldstart, , ,    =FoldText()    javascript  JavaScriptFold   javascript     javascript   console.log();hi   javascript   alert();hi   javascript     javascript   $r return   javascript   $d //////ka   javascript   $c /****/ka  HTML    html,cheetah  =xml   html,cheetah  =html  C mappings    c    :w:!gcc %  SML    sml     <leader>cd:w:!sml %  Scheme bidings   , *.scm    <leader>cd:w:!petite %  , *.scm    (pretty-print )i  , *.scm   `>a)`<i(pretty-print   SVN section    :new:read !svn diff:set syntax=diff buftype=nofilegg  Snippets    Python    python   cfun =IMAP_PutTextWithMovement   python   cclass =IMAP_PutTextWithMovement   python   cfor =IMAP_PutTextWithMovement   python   cif =IMAP_PutTextWithMovement   python   cifelse =IMAP_PutTextWithMovement  JavaScript    cheetah,html,javascript   cfun =IMAP_PutTextWithMovement   cheetah,html,javascript   cfor =IMAP_PutTextWithMovement   cheetah,html,javascript   cif =IMAP_PutTextWithMovement   cheetah,html,javascript   cifelse =IMAP_PutTextWithMovement  HTML    cheetah,html   cahref =IMAP_PutTextWithMovement   cheetah,html 

                
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值