CrunchBang Linux Pastebin - collaborative debugging

pastebin is a collaborative debugging tool allowing you to share and modify code snippets while chatting on IRC, IM or a message board.

This site is developed to XHTML and CSS2 W3C standards. If you see this paragraph, your browser does not support those standards and you need to upgrade. Visit WaSP for a variety of options.

CrunchBang Linux Pastebin

Posted by safetycopy on Sun 27th Nov 06:01 (modification of post by view diff)
download | new post

  1. set nocompatible                            " Be improved
  2.  
  3. " I like Vundle for plugin management:
  4. " git clone http://github.com/gmarik/vundle.git ~/.vim/bundle/vundle
  5. filetype off
  6. set rtp+=~/.vim/bundle/vundle
  7. call vundle#rc()
  8. " Let Vundle manage Vundle. Required!
  9. Bundle 'gmarik/vundle'
  10.  
  11. " Original repos on GitHub
  12. Bundle 'altercation/vim-colors-solarized'
  13. Bundle 'scrooloose/nerdtree'
  14. Bundle 'scrooloose/nerdcommenter'
  15. Bundle 'MarcWeber/vim-addon-mw-utils'
  16. Bundle 'tomtom/tlib_vim'
  17. Bundle 'honza/snipmate-snippets'
  18. Bundle 'garbas/vim-snipmate'
  19. Bundle 'kchmck/vim-coffee-script'
  20. Bundle 'groenewege/vim-less'
  21. Bundle 'digitaltoad/vim-jade'
  22. Bundle 'skammer/vim-css-color'
  23. Bundle 'plasticboy/vim-markdown'
  24. Bundle 'tpope/vim-rvm'
  25. Bundle 'itspriddle/vim-jquery'
  26. Bundle 'othree/html5.vim'
  27.  
  28. " vim-scripts repos
  29. Bundle 'nginx.vim'
  30.  
  31. " We now resume regular programming...
  32. filetype plugin indent on
  33.  
  34. " GUI-specific stuff
  35. if has("gui_running")
  36.         set guifont=DejaVu\ Sans\ Mono\ 11         " I like big fonts and I cannot lie
  37.   "set guifont=Terminus\ 11
  38.         set guioptions=aiA                         " Hide toolbar, menus and scrollbar
  39. endif
  40.  
  41. " Visual effects
  42. " I like the Solarized colour scheme
  43. " http://ethanschoonover.com/solarized
  44. " I set <F12> to switch between light and dark (see below)
  45. syntax on
  46. colorscheme solarized
  47. set background=dark
  48. set cursorline                              " Highlight the current line
  49. set number                                  " Show line numbers
  50. set scrolloff=3                             " Keep 3 lines above and below the cursor
  51. set showmatch                               " Show matching brackets
  52.  
  53. " Whitespace
  54. set expandtab                               " Tab becomes spaces
  55. set tabstop=2                               " Spaces for a tab
  56. set shiftwidth=2                            " Spaces used for (auto)indent
  57. set shiftround                              " Indent to nearest tabstop
  58. set autoindent                              " Carry indent over from last line
  59. set smartindent                             " Detect indentation
  60. set backspace=indent,eol,start              " Make backspace work as expected
  61. set virtualedit=all                         " Cursor can go anywhere
  62.  
  63. " Errors and warnings
  64. set noerrorbells                            " No bloody beeping!
  65. set novisualbell                            " No screen flashing either!
  66. set t_vb=                                   " As above
  67.  
  68. " Files
  69. set nobackup                                " Don't use back-ups
  70. set noswapfile                              " ...or swap files
  71. set autoread                                " Automatically load modified files
  72.  
  73. " Searches
  74. " I set ,<space> to clear highlights (see below)
  75. set hlsearch                                " Highlight matched search patterns
  76. set incsearch                               " Start searching as soon as you type
  77. set ignorecase                              " Do case insensitive matching
  78. set smartcase                               " ...unless case sensitivity makes sense
  79.  
  80. " History
  81. set history=50
  82.  
  83. " Buffers
  84. set hidden                                  " OK to hide buffers with changes
  85.  
  86. " Status line
  87. set showcmd                                 " Show partial commands in statusline
  88. set laststatus=2                            " Always show the status line
  89. " Statusline looks like: .vimrc [VIM (unix)] [ruby-1.9.2-p290] (depends on RVM)
  90. set statusline=%t\ [%Y\ (%{&ff})]\ %{rvm#statusline()}
  91.  
  92. " Custom mappings
  93. " Save a couple of key-strokes
  94. nnoremap ; :
  95. " Change leader to comma
  96. let mapleader=","
  97. " Make movement commands behave on wrapped lines
  98. nnoremap j gj
  99. nnoremap k gk
  100. " Easier window navigation
  101. map <C-h> <C-w>h
  102. map <C-j> <C-w>j
  103. map <C-k> <C-w>k
  104. map <C-l> <C-w>l
  105. " F2 toggles NERDTree
  106. map <silent> <F2> :NERDTreeToggle<CR>
  107. " F12 toggles between light and dark backgrounds
  108. map <silent> <F12> :if &background == "light"<CR>
  109.       \set background=dark<CR>
  110.       \else<CR>
  111.       \set background=light<CR>
  112.       \endif<CR>
  113. " <leader><space> clears highlighted search results
  114. nmap <silent> <leader><space> :nohlsearch<CR>
  115. " <leader>ev to edit .vimrc
  116. nnoremap <leader>ev :e! $MYVIMRC<CR>
  117.  
  118. " Auto-commands
  119. if has('autocmd')
  120.         " Re-source .vimrc on save
  121.   autocmd! BufWritePost .vimrc source %
  122.   " Recompile CoffeeScript files on save (depends on Node CoffeeScript module)
  123.   autocmd! BufWritePost *.coffee silent CoffeeMake! -b
  124.   " Recompile Jade files on save (depends on Node Jade module)
  125.   autocmd! BufWritePost *.jade silent :!jade %
  126.   " Recompile Less files on save (depends on Node Less module)
  127.   autocmd! BufWritePost *.less silent :!lessc %:r.less > %:r.css
  128.   " Remove trailing white space on save
  129.   autocmd! BufWritePre * :%s/\s\+$//e
  130.   " Syntax highlighting for Nginx config files (adjust your paths accordingly!)
  131.   autocmd! BufRead,BufNewFile /opt/nginx/conf/* set ft=nginx
  132.   autocmd! BufRead,BufNewFile /media/Collateral/Dropbox/Configs/Nginx/* set ft=nginx
  133. endif

Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Syntax highlighting:

To highlight particular lines, prefix each line with @@


Remember me