dakrone /.gvimrc

Used with MacVim
" System gvimrc file for MacVim
"
" Maintainer:	Bjorn Winckler 
" Last Change:	Sat May 10 2008
"
" This is a work in progress.  If you feel so inclined, please help me improve
" this file.


" Make sure the '<' and 'C' flags are not included in 'cpoptions', otherwise
"  would not be recognized.  See ":help 'cpoptions'".
let s:cpo_save = &cpo
set cpo&vim


"
" Global default options
"

if !exists("syntax_on")
  syntax on
endif

if !exists("colors_name")
    " Use the macvim color scheme by default
    colorscheme twilight
endif



"
" Extra menus
"


" File menu

aunmenu File.New
aunmenu File.Open\.\.\.
aunmenu File.Close
aunmenu File.-SEP4-
aunmenu File.Exit
aunmenu File.Save-Exit

an  10.290 File.New\ Window             :maca newWindow:
an  10.295 File.New\ Tab                        :tabnew
an  10.310 File.&Open\.\.\.             :maca fileOpen:
an  10.325 File.Open\ Recent            :maca recentFilesDummy:
an 10.328 File.-SEP0-                           
an  10.330 File.Close\ Window:qa   :confirm qa
an  10.331 File.Close                   :maca performClose:
"an 10.331 File.Close\ Tab                   :tabclose


" Edit menu

aunmenu Edit.Find
aunmenu Edit.Find\ and\ Replace

an 20.410.10 Edit.Find.Find\.\.\./     /
an 20.410.20 Edit.Find.Find\ Next           :maca findNext:
an 20.410.30 Edit.Find.Find\ Previous       :maca findPrevious:
vmenu 20.410.35 Edit.Find.Use\ Selection\ for\ Find y:let @/=@"n
an 20.410.40 Edit.Find.-SEP1-               
an 20.410.50 Edit.Find.Find\ and\ Replace\.\.\.:%s   :%s/
vunmenu      Edit.Find.Find\ and\ Replace\.\.\.:%s
vnoremenu    Edit.Find.Find\ and\ Replace\.\.\.:s    :s/

an 20.460 Edit.-SEP4-                       
an 20.465.10 Edit.Font.Show\ Fonts          :maca orderFrontFontPanel:
an 20.465.20 Edit.Font.-SEP5-               
an 20.465.30 Edit.Font.Bigger               :maca fontSizeUp:
an 20.465.40 Edit.Font.Smaller              :maca fontSizeDown:
an 20.470 Edit.Special\ Characters\.\.\.    :maca orderFrontCharacterPalette:


" Window menu (should be next to Help so give it a high priority)
aunmenu Window

an  9900.300 Window.Minimize            :maca performMiniaturize:
an  9900.310 Window.Zoom                :maca performZoom:
an  9900.320 Window.Toggle\ Full\ Screen\ Mode  :set invfullscreen
an 9900.330 Window.-SEP1-                       
" TODO! Grey out if no tabs are visible.
an  9900.340 Window.Previous\ Tab       :tabprevious
an  9900.350 Window.Next\ Tab           :tabnext
an 9900.360 Window.-SEP2-                       
an  9900.370 Window.Bring\ All\ To\ Front :maca arrangeInFront:


" Help menu
an 9999.1 Help.MacVim\ Help                 :h gui_mac
an  9999.2 Help.MacVim\ Website     :maca openWebsite:
an 9999.3 Help.-sep0-                       


"
" Toolbar
"
" These items are special ('*' means zero or more arbitrary characters):
"   -space*-        an empty space
"   -flexspace*-    a flexible space
"   -*-             a separator item

" Remove some items so that all items are visible at the default window size.
"aunmenu ToolBar.Undo
"aunmenu ToolBar.Redo
"aunmenu ToolBar.-sep2-
"aunmenu ToolBar.Cut
"aunmenu ToolBar.Copy
"aunmenu ToolBar.Paste
"aunmenu ToolBar.-sep3-
aunmenu ToolBar.Replace
aunmenu ToolBar.FindNext
aunmenu ToolBar.FindPrev
aunmenu ToolBar.-sep5-
aunmenu ToolBar.-sep6-
aunmenu ToolBar.RunCtags
aunmenu ToolBar.TagJump
"aunmenu ToolBar.-sep7-
aunmenu ToolBar.FindHelp

"an 1.295 ToolBar.-flexspace7-   



" This is so that HIG Cmd and Option movement mappings can be disabled by
" adding the line
"   let macvim_skip_cmd_opt_movement = 1
" to the user .vimrc
"
if !exists("macvim_skip_cmd_opt_movement")
  no          
  no!         
  no          
  no!         

  no         
  no!        
  no         
  no!        

  no            
  ino           
  map           {
  imap          {

  no          
  ino         
  map         }
  imap        }
endif " !exists("macvim_skip_cmd_opt_movement")


" This is so that the HIG shift movement related settings can be enabled by
" adding the line
"   let macvim_hig_shift_movement = 1
" to the user .vimrc (not .gvimrc!).
"
if exists("macvim_hig_shift_movement")
  " Shift + special movement key (, etc.) and mouse starts insert mode
  set selectmode=mouse,key
  set keymodel=startsel,stopsel

  " HIG related shift + special movement key mappings
  nn        
  vn        
  ino       
  nn        
  vn        
  ino       

  nn       
  vn       
  ino      
  nn       
  vn       
  ino      

  nn          
  vn          
  ino         

  nn        
  vn        
  ino       
endif " exists("macvim_hig_shift_movement")



"
" Menu key equivalents (these should always have the 'D' modifier set)
"

macmenukey File.New\ Window                       
macmenukey File.New\ Tab                          

macmenukey File.Open\.\.\.                        
macmenukey File.Open\ Tab\.\.\.                   
macmenukey File.Close\ Window                     
"macmenukey File.Close\ Tab                        
macmenukey File.Close                             
macmenukey File.Save                              
macmenukey File.Save\ As\.\.\.                    
macmenukey File.Print                             

macmenukey Edit.Undo                              
macmenukey Edit.Redo                              
macmenukey Edit.Cut                               
macmenukey Edit.Copy                              
macmenukey Edit.Paste                             
macmenukey Edit.Select\ All                       
macmenukey Edit.Find.Find\.\.\.                   
macmenukey Edit.Find.Find\ Next                   
macmenukey Edit.Find.Find\ Previous               
macmenukey Edit.Find.Use\ Selection\ for\ Find    
macmenukey Edit.Special\ Characters\.\.\.          
macmenukey Edit.Font.Bigger                       
macmenukey Edit.Font.Smaller                      

macmenukey Tools.Spelling.To\ Next\ error         
macmenukey Tools.Spelling.Suggest\ Corrections    
macmenukey Tools.Make                             
macmenukey Tools.List\ Errors                     
macmenukey Tools.List\ Messages                   
macmenukey Tools.Next\ Error                      
macmenukey Tools.Previous\ Error                  
macmenukey Tools.Older\ List                      
macmenukey Tools.Newer\ List                      

macmenukey Window.Minimize                        
macmenukey Window.Zoom                            
macmenukey Window.Toggle\ Full\ Screen\ Mode      
macmenukey Window.Previous\ Tab                   
macmenukey Window.Next\ Tab                       

" TODO:  seems to be reserved by the system on Leopard.  Disable this key
" equivalent until I can figure out what to do about it.
"macmenukey Help.MacVim\ Help                      


" Restore the previous value of 'cpoptions'.
let &cpo = s:cpo_save
unlet s:cpo_save

filetype on           " Enable filetype detection
filetype indent on    " Enable filetype-specific indenting
filetype plugin on    " Enable filetype-specific plugins
compiler ruby         " Enable compiler support for ruby

winpos 30 30
set lines=55
set columns=120