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 mahatman2 on Sun 27th Nov 05:11 (modification of post by view diff)
download | new post

  1. " These settings first
  2. filetype off
  3. call pathogen#infect()
  4. call pathogen#helptags()
  5. call pathogen#runtime_append_all_bundles()
  6.  
  7. " Call other cool features
  8. runtime macros/matchit.vim
  9.  
  10. " Filetype on
  11. filetype on
  12. filetype plugin on
  13. "filetype indent on
  14. syntax on
  15.  
  16. " Tabstops are 2 spaces
  17. set tabstop=2
  18. set shiftwidth=2
  19. set softtabstop=2
  20. set expandtab
  21. set autoindent
  22.  
  23. " Other settings
  24. set smartindent
  25. set showmatch
  26. set wrap
  27. set linebreak
  28. set showmode
  29. set autoread
  30. set hidden
  31. set backspace=indent,eol,start
  32. set equalalways "Splits always equal
  33.  
  34. " Set folds
  35. set foldmethod=marker
  36. set foldcolumn=1
  37.  
  38. " TAB completions
  39. set wildmenu
  40. set wildmode=list:longest
  41.  
  42. " Searching
  43. nnoremap / /\v
  44. vnoremap / /\v
  45. set hlsearch
  46. set incsearch
  47. set showmatch
  48. set ignorecase
  49. set smartcase
  50. set gdefault
  51. "" This clears searches. thank god.
  52. nnoremap <leader><space> :noh<cr>
  53. "" Not exactly searching, but it's good
  54. nnoremap <tab> %
  55. vnoremap <tab> %
  56. " Allow writing to files with root privileges
  57. cmap w!! w !sudo tee % > /dev/null
  58.  
  59. " Status Line
  60. set stl=[%f%Y%M]%=[%n::%l/%L(%p%%)::%c]
  61. set laststatus=2
  62. set showcmd
  63. set noruler
  64.  
  65. "" GUI Options
  66. "set guioptions=aAcgimTr
  67. """ Font
  68. "set gfn=Inconsolata\ Medium\ 12
  69.  
  70. " Solarized scheme
  71. set background=dark
  72. colorscheme solarized
  73.  
  74. " Other Look Stuff
  75. set scrolloff=8
  76. set cursorline
  77. set nocursorcolumn
  78. set title
  79. set shortmess=at
  80. "" To be ready for 7.3!
  81. set number
  82. "set relativenumber
  83.  
  84. " Swap File Allocation
  85. set backupdir=~/.vim-tmp,/var/tmp,/tmp
  86. set directory=~/.vim-tmp,/var/tmp,/tmp
  87.  
  88. " MAP LEADER
  89. let mapleader = ","
  90.  
  91. " Keymaps - Normal mode
  92. nnoremap k gk
  93. nnoremap j gj
  94. "" Keymaps - windows
  95. nnoremap <leader><tab> <C-w>v<C-w>l
  96. nnoremap <C-h> <C-w>h
  97. nnoremap <C-j> <C-w>j
  98. nnoremap <C-k> <C-w>k
  99. nnoremap <C-l> <C-w>l
  100. "nnoremap <C-S-h> <C-w><
  101. "nnoremap <C-S-j> <C-w>-
  102. "nnoremap <C-S-k> <C-w>+
  103. "nnoremap <C-S-l> <C-w>>
  104. "" Switch ` and '
  105. nnoremap ` '
  106. nnoremap ' `
  107. nnoremap Y y$
  108.  
  109. " Keymaps - Insert mode
  110. "" map jj to enter Normal mode
  111. inoremap jj <ESC>
  112.  
  113. " Keymaps - to cure annoying shit
  114. inoremap <F1> <ESC>
  115. nnoremap <F1> <ESC>
  116. vnoremap <F1> <ESC>
  117. nnoremap ; :
  118.  
  119. "--------------------- Autocorrect ------------------------
  120. iab teh       the
  121. iab Teh       The
  122. iab taht      that
  123. iab Taht      That
  124. iab alos      also
  125. iab Alos      Also
  126. iab aslo      also
  127. iab Aslo      Also
  128. iab becuase   because
  129. iab Becuase   Because
  130. iab bianry    binary
  131. iab Bianry    Binary
  132. iab bianries  binaries
  133. iab Bianries  Binaries
  134. iab charcter  character
  135. iab Charcter  Character
  136. iab charcters characters
  137. iab Charcters Characters
  138. iab exmaple   example
  139. iab Exmaple   Example
  140. iab exmaples  examples
  141. iab Exmaples  Examples
  142. iab shoudl    should
  143. iab Shoudl    Should
  144. iab seperate  separate
  145. iab Seperate  Separate
  146. iab fone      phone
  147. iab Fone      Phone
  148. "----------------------------------------------------------
  149.  
  150. "--------------------- Plugins Settings ------------------
  151. " NERD Tree Settings
  152. "" Toggle it on/off with \
  153. nnoremap \ :NERDTreeToggle<CR>
  154. "" To Quit when NERDTree is only buffer
  155. function! NERDTreeQuit()
  156.     redir => buffersoutput
  157.     silent buffers
  158.     redir END
  159.  
  160.     let pattern = '^\s*\(\d\+\)\(.....\) "\(.*\)"\s\+line \(\d\+\)$'
  161.     let windowfound = 0
  162.  
  163.     for bline in split(buffersoutput, "\n")
  164.         let m = matchlist(bline, pattern)
  165.  
  166.         if (len(m) > 0)
  167.             if (m[2] =~ '..a..')
  168.                 let windowfound = 1
  169.             endif
  170.         endif
  171.     endfor
  172.  
  173.     if (!windowfound)
  174.         quitall
  175.     endif
  176. endfunction
  177. autocmd WinEnter * call NERDTreeQuit()
  178. " NERD Comment Settings
  179. nmap <C-c> <plug>NERDCommenterToggle
  180. " ZEN Coding Settings
  181. "" Mappings
  182.  
  183. " --------------------------------------------------------
  184. "  Functions
  185. function ModeChange()
  186.     if getline(1) =~ "^#!"
  187.         if getline(1) =~ "/bin/"
  188.             silent !chmod a+x <afile>
  189.         endif
  190.     endif
  191. endfunction
  192. au BufWritePost * call ModeChange()

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