Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ""++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
- " "
- " .::::. "
- " ___________ :;;;;:`____________ "
- " \_________/ ?????L \__________/ "
- " |.....| ????????> :.......' "
- " |:::::| $$$$$$"`.:::::::' , "
- " ,|:::::| $$$$"`.:::::::' .OOS. "
- " ,7D|;;;;;| $$"`.;;;;;;;' .OOO888S. "
- " .GDDD|;;;;;| ?`.;;;;;;;' .OO8DDDDDNNS. "
- " 'DDO|IIIII| .7IIIII7' .DDDDDDDDNNNF` "
- " 'D|IIIIII7IIIII7' .DDDDDDDDNNNF` "
- " |EEEEEEEEEE7' .DDDDDDDNNNNF` "
- " |EEEEEEEEZ' .DDDDDDDDNNNF` "
- " |888888Z' .DDDDDDDDNNNF` "
- " |8888Z' ,DDDDDDDNNNNF` "
- " |88Z' "DNNNNNNN" "
- " '"' "MMMM" "
- " "" "
- " "
- " ___ ____ __ _ _ ________ ___ "
- " / | / / / __ ______ __ __ ____ ___ ___ ____/ / (_)____ | | / / _/ |/ / "
- " / /| | / / / / / / / __ \/ / / / / __ \/ _ \/ _ \/ __ / / / ___/ | | / // // /|_/ / "
- " / ___ |/ / / / /_/ / /_/ / /_/ / / / / / __/ __/ /_/ / / (__ ) | |/ // // / / / "
- " /_/ |_/_/_/ \__, /\____/\__,_/ /_/ /_/\___/\___/\__,_/ /_/____/ |___/___/_/ /_/ "
- " /_/ "
- "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
- " Plugin Inicialization ==================="{{{
- call plug#begin('~/.vim/plugged')
- " Plugins
- Plug 'tpope/vim-surround'
- Plug 'flazz/vim-colorschemes'
- Plug 'bronson/vim-trailing-whitespace'
- Plug 'morhetz/gruvbox'
- Plug 'chriskempson/base16-vim'
- Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
- Plug 'lucasteles/SWTC.Vim', { 'on': 'SWTC .vim/plugged/SWTC.vim/intro.swtc' }
- Plug 'arithran/vim-pizza' , { 'on': 'OrderPizza' }
- "Plug 'terryma/vim-multiple-cursors'
- "Plug 'ludovicchabant/vim-gutentags'
- "Plug 'rking/ag.vim'
- "Plug 'tpope/vim-fugitive'
- "Plug 'hzchirs/vim-material'
- " Tmux
- "Plug 'christoomey/vim-tmux-navigator'
- "Plug 'jgdavey/tslime.vim'
- "Plug 'jpalardy/vim-slime'
- " Languages
- "Plug 'python-mode/python-mode'
- call plug#end()"}}}
- " General Settings ========================"{{{
- " Force read encoding
- set encoding=utf-8
- " To work cool, disable compatibility with Vi
- set nocompatible
- " Set the runtime path to include Vundle and initialize
- set mouse=
- set background=dark
- " Disable cursor blink
- set gcr=a:blinkon0
- " Move the cursor to the matched string
- set incsearch
- " Search highlight
- set hlsearch
- " Search ignore case
- set ignorecase
- " Search do not wrap around
- set nowrap
- " Start scrolling 5 lines before the horizontal window border
- set scrolloff=5
- " Avoid lags
- set lazyredraw
- " Line numbers options
- set number
- set relativenumber
- set numberwidth=4
- " To display the status line always
- set laststatus=2
- " Dont unload buffers
- set hidden
- " New window is put below the current one
- set splitbelow
- " New window is put right of the current one
- set splitright
- " Show commands
- set showcmd
- " Hide mode status (INSERT, VISUAL)
- set showmode
- " Show the cursor position
- set ruler
- " Allow backspace in insert mode
- set backspace=start,eol,indent
- " Reduce the need for % in matching
- set showmatch
- set matchtime=2
- " Tab characters entered will be changed to spaces
- set expandtab
- " Number of space characters inserted for indentation
- set shiftwidth=4
- set softtabstop=4
- " Modelines off
- set nomodeline
- set modelines=0
- " Avoid creation of * .ext files
- set nowritebackup
- set nobackup
- set noswapfile
- " Automatically read changes
- set autoread
- " Hidden buffer instead of close
- set hidden
- " Increase history
- set history=50
- " Correct vim colors in tmux
- set t_Co=256
- " Ignore some directories
- set wildignore+=**/node_modules,**/bower_components,**/tmp,**/vendor,**/git
- " Python mode disable some things
- "let g:pymode_options_colorcolumn = 0
- "let g:pymode_lint = 0
- "let g:pymode_run = 0
- "let g:pymode_virtualenv = 0
- "let g:pymode_doc = 0
- "let g:pymode_folding = 0
- "let g:pymode_rope = 0
- " Vim slime with tmux
- let g:slime_target = "tmux"
- let g:slime_paste_file = "$HOME/.slime_paste"
- " Remove all trailing whitespaces at save
- autocmd BufWritePre * :%s/\s\+$//e
- " Search down into subfolders
- " Provides tab-completion for all file-related tasks
- set path+=**
- " Display all matching files when we tab complete
- set wildmenu
- "}}}
- " Folding ================================="{{{
- set foldenable
- set foldmethod=marker
- set foldlevel=999
- set foldmarker={{{,}}}
- "Maps for folding
- nnoremap <leader>ff za
- nnoremap <leader>FF zA
- nnoremap <LEADER>fu zM<CR>
- nnoremap <LEADER>uf zR<CR>
- augroup AutoSaveFolds
- autocmd!
- autocmd BufWinLeave *.* mkview
- autocmd BufWinEnter *.* silent loadview
- augroup END
- "}}}
- "{{{ Statusline ==============================
- set statusline=%!MyStatusLine()
- function! MyStatusLine()
- let statusline = ""
- " Filename (F -> full, f -> relative)
- let statusline .= "\%f"
- " Buffer flags
- let statusline .= "%( %h%1*%m%*%r%w%) "
- " File format and type
- let statusline .= "(%{&ff}%(\/%Y%))"
- " Left/right separator
- let statusline .= "%="
- " Line & column
- let statusline .= "(%l,%c%V) "
- " Character under cursor (decimal)
- let statusline .= "%03.3b "
- " Character under cursor (hexadecimal)
- let statusline .= "0x%02.2B "
- " File progress
- let statusline .= "| %P/%L"
- return statusline
- endfunction
- "}}}
- "{{{ NERDTree ================================
- let NERDTreeShowBookmarks=1
- let NERDTreeMinimalUI = 0
- let g:NERDTreeFileExtensionHighlightFullName = 1
- let g:NERDTreeExactMatchHighlightFullName = 1
- let g:NERDTreePatternMatchHighlightFullName = 1
- let g:NERDTreeHighlightFolders = 1 " enables folder icon highlighting using exact match
- let g:NERDTreeHighlightFoldersFullName = 1 " highlights the folder name
- let NERDTreeIgnore=['\.o$', '\~$']
- let NERDTreeIgnore=['node_modules', 'bower_components', 'tmp', 'vendor', 'tags', '\.o$', '\~$']
- " Toggle NERDTree
- nmap <silent> <Leader>nt :NERDTreeToggle<CR>
- "}}}
- "{{{ Syntastic ===============================
- let g:syntastic_error_symbol = '✗'
- let g:syntastic_warning_symbol = '⚠'
- let g:syntastic_check_on_wq = 0
- let g:syntastic_check_on_open = 1
- let g:syntastic_auto_loc_list = 1
- let g:syntastic_c_checkers = ['gcc', 'make']
- let g:syntastic_always_populate_loc_list = 1
- let g:syntastic_auto_jump = 1
- let g:syntastic_loc_list_height = 3"}}}
- "{{{ GUI Options =============================
- " Gui size
- if has("gui_running")
- " GUI is running or is about to start.
- " Maximize gvim window (for an alternative on Windows, see simalt below).
- set lines=999
- set columns=999
- colorscheme gruvbox
- else
- " This is console Vim.
- colorscheme base16-default-dark
- if exists("+lines")
- set lines=39
- endif
- if exists("+columns")
- set columns=133
- endif
- endif
- " Remove Bars
- set guioptions-=T
- set guioptions-=t
- set guioptions-=m
- set guioptions-=L
- set guioptions-=l
- set guioptions-=r
- "}}}
- "{{{ Maps ====================================
- " Space as leader
- map <Space> <leader>
- "Clean search
- nmap <leader>hl :nohlsearch<CR>
- " Open a new empty buffer
- nmap <leader>N :enew<cr>
- " Move to the next buffer
- nmap <leader>n :bnext<CR>
- " Move to the previous buffer
- nmap <leader>p :bprevious<CR>
- " Move to the previous buffer
- nmap <leader>D :bdelete<CR>
- " Close the current buffer and move to the previous one
- nmap <leader>bq :bp <TAB> bd #<CR>
- " Show all open buffers and their status
- nmap <leader>ls :ls<CR>
- " Run .c map
- map <F8> :!gcc % -o %< -lm && ./%< <CR>
- " Disable Arrow keys in Escape mode
- map <up> <nop>
- map <down> <nop>
- map <left> <nop>
- map <right> <nop>
- " Window buffer navigation
- map <C-h> <C-w>h
- map <C-j> <C-w>j
- map <C-k> <C-w>k
- map <C-l> <C-w>l
- " Ctrl C + Ctrl V
- vmap <C-c> "+y
- vmap <C-x> "+c
- vmap <C-v> c<ESC>"+p
- imap <C-v> <C-r><C-o>+
- " Quit
- inoremap <C-Q> <esc>:q<cr>
- nnoremap <C-Q> :q<cr>
- vnoremap <C-Q> <esc>
- nnoremap <Leader>q :q<cr>
- nnoremap <Leader>Q :qa!<cr>
- " Quickly edit/reload the vimrc file
- nmap <silent> <leader>ev :e $MYVIMRC<CR>
- nmap <silent> <leader>sv :so $MYVIMRC<CR>
- " Run shell command
- nnoremap <F9> :!bash<CR>
- " Quick search/replace:
- nnoremap <Space><Space> :'{,'}s/\<<C-r>=expand('<cword>')<CR>\>/
- nnoremap <Space>% :%s/\<<C-r>=expand('<cword>')<CR>\>/
- " Autoclosing
- inoremap (<CR> (<CR>)<Esc>O
- inoremap {<CR> {<CR>}<Esc>O
- inoremap {; {<CR>};<Esc>O
- inoremap {, {<CR>},<Esc>O
- inoremap [<CR> [<CR>]<Esc>O
- inoremap [; [<CR>];<Esc>O
- inoremap [, [<CR>],<Esc>O
- "}}}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement