Skip to content

Instantly share code, notes, and snippets.

@panterch
Created December 22, 2008 11:43
Show Gist options
  • Select an option

  • Save panterch/38961 to your computer and use it in GitHub Desktop.

Select an option

Save panterch/38961 to your computer and use it in GitHub Desktop.

Revisions

  1. panterch revised this gist Sep 17, 2010. 2 changed files with 107 additions and 96 deletions.
    13 changes: 13 additions & 0 deletions gvimrc
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    " gui settings
    set noanti guifont=Monaco:h10
    set transparency=0
    colorscheme macvim
    set background=dark

    " no toolbar in guimode
    set guioptions-=T

    if has("gui_macvim")
    macmenu &File.New\ Tab key=<nop>
    map <D-t> :CommandT<CR>
    endif
    190 changes: 94 additions & 96 deletions vimrc
    Original file line number Diff line number Diff line change
    @@ -1,96 +1,94 @@
    set fileencodings=ucs-bom,utf-8,latin1
    set encoding=utf-8
    syntax on

    " * UI settings
    "colorscheme default
    " term.app is white, makes especially comments readable (dark)
    "set background=dark
    " display the current mode and partially-typed commands in the status line:
    set showmode
    set showcmd
    " have the mouse enabled all the time
    " set mouse=a
    " show line numbers
    " set number
    " only use visual bell
    set noeb vb
    " gui settings
    " set noanti guifont=Monaco:h10
    " a status line
    set statusline=%F%m%r%h%w\ [FORMAT=%{&ff}]\ [TYPE=%Y]\ [POS=%04l,%04v]\ [LEN=%L]
    set laststatus=2
    " no toolbar in guimode
    set guioptions-=T

    " * Search & Replace
    " show the `best match so far' as search strings are typed:
    set incsearch
    " highlight search result
    set hls
    " assume the /g flag on :s substitutions to replace all matches in a line:
    set gdefault

    " * Text Fromatting
    " most copied from http://www.vex.net/~x/python_and_vim.html
    " don't make it look like there are line breaks where there aren't:
    set nowrap
    " A four^H^H^H^Htwo-space indent width is the prefered coding style for
    " Python^H^H^H^H^H^HRuby
    set tabstop=2
    " This allows you to use the < and > keys from VIM's visual (marking) mode to
    " block indent/unindent regions
    set shiftwidth=2
    set smarttab
    " Insert spaces instead of <TAB> character when the <TAB> key is pressed.
    set expandtab
    " makes VIM see multiple space characters as tabstops, and so <BS> does the
    " right thing and will delete two spaces
    set softtabstop=2
    " the indent of the new line will match that of the previous line
    set autoindent
    set textwidth=80
    " allow deletion w/ backspace over all 'boundries'
    set backspace=2
    " enable filetype detection:
    filetype on
    " enable filetype indent by plugins. this is really helpful when editing
    " source code: it will indent lines automatically depending on the type of
    " sourcecode you are editing
    filetype plugin indent on

    " * Key rebindings
    " rebind omnicomplete to Ctrl-Space
    " inoremap <Nul> <C-x><C-o>
    " Tab navigation, see http://vim.wikia.com/wiki/VimTip1221
    " in vim 7 tab navigation is done w/ <c-Page[Down|Up]>

    " do not know if this is really needed, but if not it does no harm
    autocmd FileType ruby set omnifunc=rubycomplete#Complete
    autocmd FileType python set omnifunc=pythoncomplete#Complete
    autocmd FileType javascript set omnifunc=javascriptcomplete#CompleteJS
    autocmd FileType html set omnifunc=htmlcomplete#CompleteTags
    autocmd FileType css set omnifunc=csscomplete#CompleteCSS
    autocmd FileType xml set omnifunc=xmlcomplete#CompleteTags
    autocmd FileType php set omnifunc=phpcomplete#CompletePHP
    autocmd FileType c set omnifunc=ccomplete#Complete


    " when writing mails in vim the following is handy
    " vim +':set textwidth=77' +':set wrap' +':setlocal spell spelllang=de_ch'

    " helptags ~/.vim/doc

    " some rubycomplete functionality
    let g:rubycomplete_buffer_loading = 1
    let g:rubycomplete_classes_in_global = 1
    let g:rubycomplete_rails = 1
    " ruby code indenter, see http://antono.info/en/50
    nmap <leader>rci :%!/opt/local/bin/ruby-code-indenter<cr>
    " Load matchit (% to bounce from do to end, etc.)
    runtime! macros/matchit.vim
    " haml syntax file (vim script 1773)
    au! BufRead,BufNewFile *.haml setfiletype haml



    set fileencodings=ucs-bom,utf-8,latin1
    set encoding=utf-8
    syntax on

    " * UI settings
    "colorscheme default
    " term.app is white, makes especially comments readable (dark)
    "set background=dark
    " display the current mode and partially-typed commands in the status line:
    set showmode
    set showcmd
    " have the mouse enabled all the time
    " set mouse=a
    " show line numbers
    " set number
    " only use visual bell
    set noeb vb
    " gui settings
    " set noanti guifont=Monaco:h10
    " a status line
    set statusline=%F%m%r%h%w\ [FORMAT=%{&ff}]\ [TYPE=%Y]\ [POS=%04l,%04v]\ [LEN=%L]
    set laststatus=2

    " * Search & Replace
    " show the `best match so far' as search strings are typed:
    set incsearch
    " highlight search result
    set hls
    " assume the /g flag on :s substitutions to replace all matches in a line:
    set gdefault

    " * Text Fromatting
    " most copied from http://www.vex.net/~x/python_and_vim.html
    " don't make it look like there are line breaks where there aren't:
    set nowrap
    " A four^H^H^H^Htwo-space indent width is the prefered coding style for
    " Python^H^H^H^H^H^HRuby
    set tabstop=2
    " This allows you to use the < and > keys from VIM's visual (marking) mode to
    " block indent/unindent regions
    set shiftwidth=2
    set smarttab
    " Insert spaces instead of <TAB> character when the <TAB> key is pressed.
    set expandtab
    " makes VIM see multiple space characters as tabstops, and so <BS> does the
    " right thing and will delete two spaces
    set softtabstop=2
    " the indent of the new line will match that of the previous line
    set autoindent
    set textwidth=80
    " allow deletion w/ backspace over all 'boundries'
    set backspace=2
    " enable filetype detection:
    filetype on
    " enable filetype indent by plugins. this is really helpful when editing
    " source code: it will indent lines automatically depending on the type of
    " sourcecode you are editing
    filetype plugin indent on

    " * Key rebindings
    " rebind omnicomplete to Ctrl-Space
    " inoremap <Nul> <C-x><C-o>
    " Tab navigation, see http://vim.wikia.com/wiki/VimTip1221
    " in vim 7 tab navigation is done w/ <c-Page[Down|Up]>

    " do not know if this is really needed, but if not it does no harm
    autocmd FileType ruby set omnifunc=rubycomplete#Complete
    autocmd FileType python set omnifunc=pythoncomplete#Complete
    autocmd FileType javascript set omnifunc=javascriptcomplete#CompleteJS
    autocmd FileType html set omnifunc=htmlcomplete#CompleteTags
    autocmd FileType css set omnifunc=csscomplete#CompleteCSS
    autocmd FileType xml set omnifunc=xmlcomplete#CompleteTags
    autocmd FileType php set omnifunc=phpcomplete#CompletePHP
    autocmd FileType c set omnifunc=ccomplete#Complete


    " when writing mails in vim the following is handy
    " vim +':set textwidth=77' +':set wrap' +':setlocal spell spelllang=de_ch'

    " helptags ~/.vim/doc

    " some rubycomplete functionality
    let g:rubycomplete_buffer_loading = 1
    let g:rubycomplete_classes_in_global = 1
    let g:rubycomplete_rails = 1
    " ruby code indenter, see http://antono.info/en/50
    nmap <leader>rci :%!/opt/local/bin/ruby-code-indenter<cr>
    " Load matchit (% to bounce from do to end, etc.)
    runtime! macros/matchit.vim
    " haml syntax file (vim script 1773)
    au! BufRead,BufNewFile *.haml setfiletype haml



  2. panterch revised this gist Jan 29, 2009. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions vimrc
    Original file line number Diff line number Diff line change
    @@ -16,7 +16,7 @@ set showcmd
    " only use visual bell
    set noeb vb
    " gui settings
    set noanti guifont=Monaco:h10
    " set noanti guifont=Monaco:h10
    " a status line
    set statusline=%F%m%r%h%w\ [FORMAT=%{&ff}]\ [TYPE=%Y]\ [POS=%04l,%04v]\ [LEN=%L]
    set laststatus=2
    @@ -79,7 +79,7 @@ autocmd FileType c set omnifunc=ccomplete#Complete
    " when writing mails in vim the following is handy
    " vim +':set textwidth=77' +':set wrap' +':setlocal spell spelllang=de_ch'

    helptags ~/.vim/doc
    " helptags ~/.vim/doc

    " some rubycomplete functionality
    let g:rubycomplete_buffer_loading = 1
  3. panterch created this gist Dec 22, 2008.
    96 changes: 96 additions & 0 deletions vimrc
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,96 @@
    set fileencodings=ucs-bom,utf-8,latin1
    set encoding=utf-8
    syntax on

    " * UI settings
    "colorscheme default
    " term.app is white, makes especially comments readable (dark)
    "set background=dark
    " display the current mode and partially-typed commands in the status line:
    set showmode
    set showcmd
    " have the mouse enabled all the time
    " set mouse=a
    " show line numbers
    " set number
    " only use visual bell
    set noeb vb
    " gui settings
    set noanti guifont=Monaco:h10
    " a status line
    set statusline=%F%m%r%h%w\ [FORMAT=%{&ff}]\ [TYPE=%Y]\ [POS=%04l,%04v]\ [LEN=%L]
    set laststatus=2
    " no toolbar in guimode
    set guioptions-=T

    " * Search & Replace
    " show the `best match so far' as search strings are typed:
    set incsearch
    " highlight search result
    set hls
    " assume the /g flag on :s substitutions to replace all matches in a line:
    set gdefault

    " * Text Fromatting
    " most copied from http://www.vex.net/~x/python_and_vim.html
    " don't make it look like there are line breaks where there aren't:
    set nowrap
    " A four^H^H^H^Htwo-space indent width is the prefered coding style for
    " Python^H^H^H^H^H^HRuby
    set tabstop=2
    " This allows you to use the < and > keys from VIM's visual (marking) mode to
    " block indent/unindent regions
    set shiftwidth=2
    set smarttab
    " Insert spaces instead of <TAB> character when the <TAB> key is pressed.
    set expandtab
    " makes VIM see multiple space characters as tabstops, and so <BS> does the
    " right thing and will delete two spaces
    set softtabstop=2
    " the indent of the new line will match that of the previous line
    set autoindent
    set textwidth=80
    " allow deletion w/ backspace over all 'boundries'
    set backspace=2
    " enable filetype detection:
    filetype on
    " enable filetype indent by plugins. this is really helpful when editing
    " source code: it will indent lines automatically depending on the type of
    " sourcecode you are editing
    filetype plugin indent on

    " * Key rebindings
    " rebind omnicomplete to Ctrl-Space
    " inoremap <Nul> <C-x><C-o>
    " Tab navigation, see http://vim.wikia.com/wiki/VimTip1221
    " in vim 7 tab navigation is done w/ <c-Page[Down|Up]>

    " do not know if this is really needed, but if not it does no harm
    autocmd FileType ruby set omnifunc=rubycomplete#Complete
    autocmd FileType python set omnifunc=pythoncomplete#Complete
    autocmd FileType javascript set omnifunc=javascriptcomplete#CompleteJS
    autocmd FileType html set omnifunc=htmlcomplete#CompleteTags
    autocmd FileType css set omnifunc=csscomplete#CompleteCSS
    autocmd FileType xml set omnifunc=xmlcomplete#CompleteTags
    autocmd FileType php set omnifunc=phpcomplete#CompletePHP
    autocmd FileType c set omnifunc=ccomplete#Complete


    " when writing mails in vim the following is handy
    " vim +':set textwidth=77' +':set wrap' +':setlocal spell spelllang=de_ch'

    helptags ~/.vim/doc

    " some rubycomplete functionality
    let g:rubycomplete_buffer_loading = 1
    let g:rubycomplete_classes_in_global = 1
    let g:rubycomplete_rails = 1
    " ruby code indenter, see http://antono.info/en/50
    nmap <leader>rci :%!/opt/local/bin/ruby-code-indenter<cr>
    " Load matchit (% to bounce from do to end, etc.)
    runtime! macros/matchit.vim
    " haml syntax file (vim script 1773)
    au! BufRead,BufNewFile *.haml setfiletype haml