Advertisement
Guest User

Untitled

a guest
May 26th, 2017
530
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.73 KB | None | 0 0
  1. let g:BASH_AuthorName = 'Krzysztof Antczak'
  2. let g:BASH_Email = 'k.antczak@livedata.pl'
  3. let g:BASH_Company = 'Livedata'
  4.  
  5. syntax on
  6.  
  7. set background=dark
  8.  
  9. " Uncomment the following to have Vim jump to the last position when
  10. " reopening a file
  11. if has("autocmd")
  12. au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$")
  13. \| exe "normal g'\"" | endif
  14. endif
  15.  
  16. " Uncomment the following to have Vim load indentation rules according to the
  17. " detected filetype. Per default Debian Vim only load filetype specific
  18. " plugins.
  19. if has("autocmd")
  20. filetype indent on
  21. endif
  22.  
  23. " The following are commented out as they cause vim to behave a lot
  24. " differently from regular Vi. They are highly recommended though.
  25.  
  26. set showcmd " Show (partial) command in status line.
  27. set showmatch " Show matching brackets.
  28. set ignorecase " Do case insensitive matching
  29. set smartcase " Do smart case matching
  30. set incsearch " Incremental search
  31. set autowrite " Automatically save before commands like :next and :make
  32. set hidden " Hide buffers when they are abandoned
  33. set expandtab " convert tabs to spaces
  34. set softtabstop=4 " tab of length 2
  35. set shiftwidth=4 " indentation tab to 2 spaces
  36. set nowrap " do not wrap lines
  37. set scrolloff=4 " Always show 4 lines above and bellow cursor (context)
  38. set backspace=2
  39. set ttyfast " smoother changes
  40. set autoindent " always set autoindenting on
  41. set smartindent " smart indent
  42. set cindent " cindent
  43.  
  44. set fileencodings=utf-8
  45. set encoding=utf-8
  46.  
  47. set viminfo+=!
  48. set history=1000 " history
  49. set linespace=0 " space it out a little more (easier to read)
  50. set ruler " Always show current positions along the bottom
  51. set mouse=a " use mouse everywhere
  52. set report=0 " tell us when anything is changed via :...
  53. set list listchars=tab:\ \ ,trail:�,eol:� " mark trailing white space !!!!
  54.  
  55. "set shortmess=atI " shortens messages to avoid 'press a key' prompt
  56.  
  57. set vb " blink instead beep
  58.  
  59. set wildmenu " autocomplete menu - works with vim commands, and filesystem
  60. set guioptions-=T
  61. set completeopt-=preview
  62. set gcr=a:blinkon0
  63.  
  64. " Visual Cues {
  65. set matchtime=5 " how many tenths of a second to blink matching brackets for
  66. set hlsearch
  67. set incsearch " BUT do highlight as you type you search phrase
  68. set scrolloff=5 " Keep 5 lines (top/bottom) for scope
  69. set sidescrolloff=5 " Keep 5 lines at the size
  70. set vb " blink instead beep
  71. set statusline=%f%m%r%h%w\ [POS=%04l,%04v][%p%%]\ [LEN=%L]
  72. set statusline=%F%m%r%h%w\ [FORMAT=%{&ff}]\ [TYPE=%Y]\ [ENCODE=%{&fenc}]\ [POS=%04l,%04v][%p%%]\ [LEN=%L]
  73. set laststatus=2 " always show the status line
  74. "set cmdheight=5
  75. " }
  76.  
  77. " Indent Related {
  78. set nosmartindent " smartindent (filetype indenting instead)
  79. set autoindent " autoindent (should be overwrote by cindent or filetype indent)
  80. set cindent " do c-style indenting
  81. set softtabstop=4 " unify
  82. set shiftwidth=4 " unify
  83. set tabstop=4 " real tabs should be 4, but they will show with set list on
  84. set copyindent " but above all -- follow the conventions laid before us
  85. " }
  86.  
  87. " Text Formatting/Layout {
  88. "set formatoptions=tcrq " See Help (complex)
  89. set shiftround " when at 3 spaces, and I hit > ... go to 4, not 5
  90. set nowrap " do not wrap line
  91. set preserveindent " but above all -- follow the conventions laid before us
  92. set ignorecase " case insensitive by default
  93. set smartcase " if there are caps, go case-sensitive
  94. set completeopt=menu,longest,preview " improve the way autocomplete works
  95. set nocursorcolumn " show the current column
  96. " }
  97.  
  98. " Folding {
  99. set foldenable " Turn on folding
  100. set foldmarker={,} " Fold C style code (only use this as default if you use a high foldlevel)
  101. set foldcolumn=4 " Give 1 column for fold markers
  102. "set foldopen-=search " don't open folds when you search into them
  103. "set foldopen-=undo " don't open folds when you undo stuff
  104. set foldmethod=marker " Fold on the marker
  105. set foldlevel=1000 " Don't autofold anything (but I can still fold manually)
  106. " }
  107.  
  108. " Tab navigation {
  109. :nmap <C-n> :tabnew<CR>:FufFile<CR>
  110. :imap <C-n> <Esc>:tabnew<CR>:FufFile<CR>
  111.  
  112. :nmap - :tabprev<CR>
  113. :nmap + :tabnext<CR>
  114. " }
  115.  
  116. au BufNewFile,BufRead *.module set filetype=php
  117. au BufNewFile,BufRead *.test set filetype=php
  118. au BufNewFile,BufRead *.install set filetype=php
  119. au BufNewFile,BufRead *.inc set filetype=php
  120.  
  121.  
  122. autocmd FileType javascript set omnifunc=javascriptcomplete#CompleteJS
  123. autocmd FileType html set omnifunc=htmlcomplete#CompleteTags
  124. autocmd FileType css set omnifunc=csscomplete#CompleteCSS
  125. autocmd FileType xml set omnifunc=xmlcomplete#CompleteTags
  126. autocmd FileType php set omnifunc=phpcomplete#CompletePHP
  127. autocmd FileType inc set omnifunc=phpcomplete#CompletePHP
  128.  
  129. set tags=./tags;/var/www
  130.  
  131. if &diff
  132. set background=dark
  133. colorscheme peaksea
  134. endif
  135.  
  136.  
  137.  
  138. " custom keybinginds (left key press perform the right key commands)
  139.  
  140. " Toggle fold
  141. noremap f za
  142. " Close all folds
  143. noremap F zM
  144. " Open all folds
  145. noremap O zR
  146.  
  147. :set number
  148. :set t_Co=256
  149. "colorscheme wombat256
  150. "colorscheme molokai
  151. colorscheme neverland
  152. :fixdel
  153.  
  154. "#:set t_kb=^?
  155. "#:set shortmess=filnxtToOI
  156. "#map! <Ctrl+V><Home> <Ctrl+V><Alt+0>i
  157.  
  158. "#map <C-z> :u<CR> " undo
  159. :set spelllang=pl
  160. ":set spell
  161.  
  162. command Php :!php %
  163. map <F5> :Php<CR>
  164. imap <F5> <ESC>:Php<CR>
  165.  
  166. " Check php files for syntax errors {
  167. noremap <C-B> :!php -1 %<CR>
  168. " }
  169.  
  170. map <F7> :FufFile<CR>
  171. imap <F7> :FufFile<CR>
  172.  
  173. map <F2> :w<CR>
  174. imap <F2> <ESC>:w<CR>
  175.  
  176. map <F10> :q<CR>
  177. imap <F10> :q<CR>
  178.  
  179. set wmh=0
  180.  
  181. set nobackup
  182. set nowritebackup
  183. set noswapfile
  184.  
  185. " PHP {
  186.  
  187. let php_sql_query = 1
  188. let php_htmlInStrings = 1
  189. let php_baselib = 1
  190. let php_smart_members = 1
  191. let php_alt_properties = 1
  192. let php_highlight_quotes = 1
  193. let php_alt_construct_parents = 1
  194. let php_nested_functions = 1
  195. let php_oldStyle = 0
  196. let php_folding = 2
  197. let php_fold_arrays = 1
  198. let php_fold_heredoc = 1
  199.  
  200.  
  201. " }
  202.  
  203. set cursorline
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement