Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- set nocompatible " be iMproved, required
- filetype off " required
- " set the runtime path to include Vundle and initialize
- set rtp+=~/.vim/bundle/Vundle.vim
- call vundle#begin()
- " alternatively, pass a path where Vundle should install plugins
- "call vundle#begin('~/some/path/here')
- " let Vundle manage Vundle, required
- Plugin 'VundleVim/Vundle.vim'
- " The following are examples of different formats supported.
- " Keep Plugin commands between vundle#begin/end.
- " plugin on GitHub repo
- Plugin 'tpope/vim-fugitive'
- Plugin 'https://github.com/scrooloose/nerdtree.git'
- " plugin from http://vim-scripts.org/vim/scripts.html
- " Plugin 'L9'
- " Git plugin not hosted on GitHub
- Plugin 'git://git.wincent.com/command-t.git'
- Plugin 'jkramer/vim-checkbox'
- Plugin 'skwp/vim-conque'
- " git repos on your local machine (i.e. when working on your own plugin)
- "Plugin 'file:///home/gmarik/path/to/plugin'
- " The sparkup vim script is in a subdirectory of this repo called vim.
- " Pass the path to set the runtimepath properly.
- Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
- " Install L9 and avoid a Naming conflict if you've already installed a
- " different version somewhere else.
- " Plugin 'ascenator/L9', {'name': 'newL9'}
- Plugin 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
- Plugin 'ronakg/quickr-cscope.vim'
- " All of your Plugins must be added before the following line
- call vundle#end() " required
- filetype plugin indent on " required
- " If installed using git
- " To ignore plugin indent changes, instead use:
- "filetype plugin on
- "
- " Brief help
- " :PluginList - lists configured plugins
- " :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate
- " :PluginSearch foo - searches for foo; append `!` to refresh local cache
- " :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal
- "
- " see :h vundle for more details or wiki for FAQ
- " Put your non-Plugin stuff after this line
- "
- set noswapfile
- " set mouse=a
- " set number
- " set relativenumber
- vertical resize 80
- "
- "set paste
- set background=dark
- set autoindent
- set cindent
- set softtabstop=2
- set tabstop=2
- set shiftwidth=2
- set expandtab
- " Align subsequent lines to open parantheses in C sources and indent using
- " " nuttx brackets style.
- set cinoptions+=>2s,n-1s,{1s,^-1s,:2s,(0
- autocmd BufNewFile,BufRead * setlocal formatoptions+=t
- set hidden
- set smartcase
- set ignorecase
- set splitright
- set incsearch
- set hlsearch
- " use system clipboard
- set clipboard=unnamed
- set clipboard=unnamedplus
- hi CursorLine cterm=NONE ctermbg=darkred ctermfg=white guibg=darkred guifg=Gray
- hi CursorColumn cterm=NONE ctermbg=darkred ctermfg=white guibg=darkred guifg=white
- nnoremap <Leader>c :set cursorline! cursorcolumn!<CR>
- set cursorline
- " colorscheme ron
- nmap <Space> <PageDown>
- vmap <Space> <PageDown>
- set autowrite
- set statusline=%<%f\ %y%h%m%r%=%-24.(0x%02B,%l/%L,%c%V%)\ %P
- set laststatus=2
- set wildmenu
- " tab completion more like the one in bash
- set wildmode=longest,list,full
- " persistent undo
- set undofile
- set undodir=~/.vim/undo
- set undolevels=1000
- set undoreload=10000
- "set colorcolumn=80
- "match Error '\%>80v.\+'
- "hi Error ctermfg=Red guifg=Red
- :2mat ErrorMsg '\%81v.'
- " linie verticala gri
- "highlight ColorColumn ctermbg=lightgray
- "set colorcolumn=80
- ",81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96
- function! RemoveTrailingWhitespacesAndTabs()
- normal mz
- silent %s/\(\( *\)\|\(\t\t*\)\)\(\( *\)\|\(\t\t*\)\)*$//e
- normal `z
- delmarks z
- endfunction
- autocmd BufWritePre * call RemoveTrailingWhitespacesAndTabs()
- " Disable Arrow keys in Escape mode
- map <up> <Esc>:vertical resize 80<CR>:set wfw<CR>
- map <down> <Esc>:windo set nowfw<CR><C-W>=
- map <left> <C-W><
- map <right> <C-W>>
- map <C-L> <C-W><right>
- map <C-H> <C-W><left>
- map <left> <C-W><
- map <right> <C-W>>
- " Disable Arrow keys in Insert mode
- imap <up> <nop>
- imap <down> <nop>
- imap <left> <nop>
- imap <right> <nop>
- set scrolloff=5
- " This is the default extra key bindings
- let g:fzf_action = {
- \ 'ctrl-t': 'tab split',
- \ 'ctrl-x': 'split',
- \ 'ctrl-v': 'vsplit' }
- " An action can be a reference to a function that processes selected lines
- function! s:build_quickfix_list(lines)
- call setqflist(map(copy(a:lines), '{ "filename": v:val }'))
- copen
- cc
- endfunction
- let g:fzf_action = {
- \ 'ctrl-q': function('s:build_quickfix_list'),
- \ 'ctrl-t': 'tab split',
- \ 'ctrl-x': 'split',
- \ 'ctrl-v': 'vsplit' }
- " Default fzf layout
- " - down / up / left / right
- let g:fzf_layout = { 'down': '~40%' }
- " You can set up fzf window using a Vim command (Neovim or latest Vim 8 required)
- let g:fzf_layout = { 'window': 'enew' }
- let g:fzf_layout = { 'window': '-tabnew' }
- let g:fzf_layout = { 'window': '10split enew' }
- " Customize fzf colors to match your color scheme
- let g:fzf_colors =
- \ { 'fg': ['fg', 'Normal'],
- \ 'bg': ['bg', 'Normal'],
- \ 'hl': ['fg', 'Comment'],
- \ 'fg+': ['fg', 'CursorLine', 'CursorColumn', 'Normal'],
- \ 'bg+': ['bg', 'CursorLine', 'CursorColumn'],
- \ 'hl+': ['fg', 'Statement'],
- \ 'info': ['fg', 'PreProc'],
- \ 'border': ['fg', 'Ignore'],
- \ 'prompt': ['fg', 'Conditional'],
- \ 'pointer': ['fg', 'Exception'],
- \ 'marker': ['fg', 'Keyword'],
- \ 'spinner': ['fg', 'Label'],
- \ 'header': ['fg', 'Comment'] }
- " Enable per-command history.
- " CTRL-N and CTRL-P will be automatically bound to next-history and
- " previous-history instead of down and up. If you don't like the change,
- " explicitly bind the keys to down and up in your $FZF_DEFAULT_OPTS.
- let g:fzf_history_dir = '~/.local/share/fzf-history'
- noremap <C-@> :FZF<CR>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement