- Keebler
- Aug 21, 2000
-
|
vimrc? Here's mine, shamelessly stolen from someone else.
I've been using VIM for coding for a while now, my only complaint over using an IDE is that I don't have a nice visual debugger available to use. Does anything like the MSVC debugger exist that might run in this environment? I tend to use C/C++.
Aw crap, meant to put that image in as a thumbnail :-(
code:set nocompatible
set encoding=utf-8
filetype off
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
Bundle 'gmarik/vundle'
Bundle 'Lokaltog/vim-powerline'
Bundle 'w0ng/vim-hybrid'
Bundle 'scrooloose/syntastic'
" Easy Plugin Install
call pathogen#infect()
filetype plugin indent on
syntax on
set backspace=2 " enable <BS> for everything
set completeopt-=preview " don't show preview window
set cursorline " highlight the line where the cursor is
set fcs=vert:│,fold:- " solid instead of broken line for vert splits
set hidden " hide when switching buffers, don't unload
set laststatus=2 " always show status line
set lazyredraw " don't update the screen when executing macros
set mouse=a " enable mouse scroll
set nowrap " disable word wrap
set number " show line numbers
set showcmd " show command on last line of screen
set showmatch " show bracket matches
set textwidth=0 " don't break lines after some maximum width
set title " use file name in window title
set wildmenu " enhanched cmd line completion
set spelllang=en_US
set clipboard=autoselect
set ttymouse=xterm2
" Folding
set foldignore= " don't ignore anything when folding
set foldlevelstart=99 " no folds closed on open
set foldmethod=marker " collapse code using markers
" Tabs
set autoindent " copy indent from previous line
set expandtab " replace tabs with spaces
set shiftwidth=4 " spaces for autoindenting
set smarttab " <BS> removes shiftwidth worth of spaces
set softtabstop=4 " spaces for editing, e.g. <Tab> or <BS>
set tabstop=4 " spaces for <Tab>
" Searches
set hlsearch " highlight search results
set incsearch " search whilst typing
set ignorecase " case insensitive searching
set smartcase " override ignorecase if upper case typed
" Colors
set t_Co=256
let g:hybrid_use_Xresources = 0
colorscheme hybrid
" Toggle spellcheck
nnoremap <leader>s :set spell!<CR>
" Check file for errors
nnoremap <leader>c :SyntasticCheck<CR>
" Show Quickfix window for Syntastic errors
nnoremap <leader>e :Errors<CR>
" Search for trailing whitespace
nnoremap <leader>w /\s\+$<CR>
" Fancy Tingies
let g:SuperTabDefaultCompletionType = "context"
let g:Powerline_symbols = 'fancy'
let g:syntastic_mode_map = { 'mode': 'passive' }
" Functions {{{
"
" -----------------------------------------------------------------------------
function! ToggleFoldMethod()
if &foldmethod == 'indent'
set foldmethod=marker
echo "foldmethod=marker"
else
set foldmethod=indent
echo "foldmethod=indent"
endif
endfunction
function! ToggleRelativeNumber()
if &relativenumber
set number
else
set relativenumber
endif
endfunction
"}}}
Only registered members can see post attachments!
Keebler fucked around with this message at 20:34 on Jun 4, 2013
|
#
¿
Jun 4, 2013 20:29
|
|
- Adbot
-
ADBOT LOVES YOU
|
|
#
¿
May 2, 2024 22:02
|
|