Advertisement
Guest User

Untitled

a guest
Jan 17th, 2020
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.72 KB | None | 0 0
  1.  
  2. set nocompatible " be iMproved, required
  3. filetype off " required
  4.  
  5. " set the runtime path to include Vundle and initialize
  6. set rtp+=~/.vim/bundle/Vundle.vim
  7. call vundle#begin()
  8. " alternatively, pass a path where Vundle should install plugins
  9. "call vundle#begin('~/some/path/here')
  10.  
  11. " let Vundle manage Vundle, required
  12. Plugin 'VundleVim/Vundle.vim'
  13.  
  14. " The following are examples of different formats supported.
  15. " Keep Plugin commands between vundle#begin/end.
  16. " plugin on GitHub repo
  17. Plugin 'tpope/vim-fugitive'
  18. Plugin 'https://github.com/scrooloose/nerdtree.git'
  19. " plugin from http://vim-scripts.org/vim/scripts.html
  20. " Plugin 'L9'
  21. " Git plugin not hosted on GitHub
  22. Plugin 'git://git.wincent.com/command-t.git'
  23. Plugin 'jkramer/vim-checkbox'
  24. Plugin 'skwp/vim-conque'
  25. " git repos on your local machine (i.e. when working on your own plugin)
  26. "Plugin 'file:///home/gmarik/path/to/plugin'
  27. " The sparkup vim script is in a subdirectory of this repo called vim.
  28. " Pass the path to set the runtimepath properly.
  29. Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
  30. " Install L9 and avoid a Naming conflict if you've already installed a
  31. " different version somewhere else.
  32. " Plugin 'ascenator/L9', {'name': 'newL9'}
  33. Plugin 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
  34. Plugin 'ronakg/quickr-cscope.vim'
  35. " All of your Plugins must be added before the following line
  36. call vundle#end() " required
  37. filetype plugin indent on " required
  38. " If installed using git
  39. " To ignore plugin indent changes, instead use:
  40. "filetype plugin on
  41. "
  42. " Brief help
  43. " :PluginList - lists configured plugins
  44. " :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate
  45. " :PluginSearch foo - searches for foo; append `!` to refresh local cache
  46. " :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal
  47. "
  48. " see :h vundle for more details or wiki for FAQ
  49. " Put your non-Plugin stuff after this line
  50. "
  51. set noswapfile
  52.  
  53. " set mouse=a
  54. " set number
  55. " set relativenumber
  56. vertical resize 80
  57. "
  58. "set paste
  59.  
  60. set background=dark
  61. set autoindent
  62. set cindent
  63.  
  64. set softtabstop=2
  65. set tabstop=2
  66. set shiftwidth=2
  67. set expandtab
  68.  
  69. " Align subsequent lines to open parantheses in C sources and indent using
  70. " " nuttx brackets style.
  71. set cinoptions+=>2s,n-1s,{1s,^-1s,:2s,(0
  72.  
  73. autocmd BufNewFile,BufRead * setlocal formatoptions+=t
  74.  
  75. set hidden
  76. set smartcase
  77. set ignorecase
  78. set splitright
  79. set incsearch
  80. set hlsearch
  81.  
  82. " use system clipboard
  83. set clipboard=unnamed
  84. set clipboard=unnamedplus
  85.  
  86. hi CursorLine cterm=NONE ctermbg=darkred ctermfg=white guibg=darkred guifg=Gray
  87. hi CursorColumn cterm=NONE ctermbg=darkred ctermfg=white guibg=darkred guifg=white
  88. nnoremap <Leader>c :set cursorline! cursorcolumn!<CR>
  89.  
  90. set cursorline
  91.  
  92. " colorscheme ron
  93.  
  94. nmap <Space> <PageDown>
  95. vmap <Space> <PageDown>
  96. set autowrite
  97. set statusline=%<%f\ %y%h%m%r%=%-24.(0x%02B,%l/%L,%c%V%)\ %P
  98.  
  99. set laststatus=2
  100. set wildmenu
  101.  
  102. " tab completion more like the one in bash
  103. set wildmode=longest,list,full
  104.  
  105. " persistent undo
  106. set undofile
  107. set undodir=~/.vim/undo
  108. set undolevels=1000
  109. set undoreload=10000
  110.  
  111. "set colorcolumn=80
  112. "match Error '\%>80v.\+'
  113. "hi Error ctermfg=Red guifg=Red
  114. :2mat ErrorMsg '\%81v.'
  115.  
  116. " linie verticala gri
  117. "highlight ColorColumn ctermbg=lightgray
  118. "set colorcolumn=80
  119. ",81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96
  120.  
  121.  
  122. function! RemoveTrailingWhitespacesAndTabs()
  123. normal mz
  124. silent %s/\(\( *\)\|\(\t\t*\)\)\(\( *\)\|\(\t\t*\)\)*$//e
  125. normal `z
  126. delmarks z
  127. endfunction
  128. autocmd BufWritePre * call RemoveTrailingWhitespacesAndTabs()
  129. " Disable Arrow keys in Escape mode
  130. map <up> <Esc>:vertical resize 80<CR>:set wfw<CR>
  131. map <down> <Esc>:windo set nowfw<CR><C-W>=
  132. map <left> <C-W><
  133. map <right> <C-W>>
  134.  
  135. map <C-L> <C-W><right>
  136. map <C-H> <C-W><left>
  137. map <left> <C-W><
  138. map <right> <C-W>>
  139. " Disable Arrow keys in Insert mode
  140. imap <up> <nop>
  141. imap <down> <nop>
  142. imap <left> <nop>
  143. imap <right> <nop>
  144.  
  145. set scrolloff=5
  146.  
  147.  
  148.  
  149.  
  150.  
  151. " This is the default extra key bindings
  152. let g:fzf_action = {
  153. \ 'ctrl-t': 'tab split',
  154. \ 'ctrl-x': 'split',
  155. \ 'ctrl-v': 'vsplit' }
  156.  
  157. " An action can be a reference to a function that processes selected lines
  158. function! s:build_quickfix_list(lines)
  159. call setqflist(map(copy(a:lines), '{ "filename": v:val }'))
  160. copen
  161. cc
  162. endfunction
  163.  
  164. let g:fzf_action = {
  165. \ 'ctrl-q': function('s:build_quickfix_list'),
  166. \ 'ctrl-t': 'tab split',
  167. \ 'ctrl-x': 'split',
  168. \ 'ctrl-v': 'vsplit' }
  169.  
  170. " Default fzf layout
  171. " - down / up / left / right
  172. let g:fzf_layout = { 'down': '~40%' }
  173.  
  174. " You can set up fzf window using a Vim command (Neovim or latest Vim 8 required)
  175. let g:fzf_layout = { 'window': 'enew' }
  176. let g:fzf_layout = { 'window': '-tabnew' }
  177. let g:fzf_layout = { 'window': '10split enew' }
  178.  
  179. " Customize fzf colors to match your color scheme
  180. let g:fzf_colors =
  181. \ { 'fg': ['fg', 'Normal'],
  182. \ 'bg': ['bg', 'Normal'],
  183. \ 'hl': ['fg', 'Comment'],
  184. \ 'fg+': ['fg', 'CursorLine', 'CursorColumn', 'Normal'],
  185. \ 'bg+': ['bg', 'CursorLine', 'CursorColumn'],
  186. \ 'hl+': ['fg', 'Statement'],
  187. \ 'info': ['fg', 'PreProc'],
  188. \ 'border': ['fg', 'Ignore'],
  189. \ 'prompt': ['fg', 'Conditional'],
  190. \ 'pointer': ['fg', 'Exception'],
  191. \ 'marker': ['fg', 'Keyword'],
  192. \ 'spinner': ['fg', 'Label'],
  193. \ 'header': ['fg', 'Comment'] }
  194.  
  195. " Enable per-command history.
  196. " CTRL-N and CTRL-P will be automatically bound to next-history and
  197. " previous-history instead of down and up. If you don't like the change,
  198. " explicitly bind the keys to down and up in your $FZF_DEFAULT_OPTS.
  199. let g:fzf_history_dir = '~/.local/share/fzf-history'
  200. noremap <C-@> :FZF<CR>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement