Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
2.0 kB
2
Indexable
Never
"""""""""""""""""""""""""""
" Plugins 
"""""""""""""""""""""""""""
call plug#begin('~/.vim/plugged')

Plug 'preservim/nerdtree'
Plug 'vim-airline/vim-airline'
Plug 'valloric/youcompleteme'
Plug 'rafi/awesome-vim-colorschemes'
Plug 'https://github.com/guns/xterm-color-table.vim'

call plug#end()

"""""""""""""""""""""""""""
" Color-fix and ColorScheme
"""""""""""""""""""""""""""
set termguicolors
colo gruvbox-material

"""""""""""""""""""""""""""
" Keybindings
"""""""""""""""""""""""""""

"NOTE TO SELF: C-char = CTRL+char | nnoremap = controlmode | inoremap = insertmode

"Airlines
" Allows to move between tabs.
nnoremap <C-Left> :bprevious<CR>
nnoremap <C-Right> :bnext<CR>

"NerdTree
nnoremap <C-n> :NERDTreeFocus<CR>
nnoremap <C-t> :NERDTreeToggle<CR>
nnoremap <C-f> :NERDTreeFind<CR>

"Allows to press CTRL-r in visual-mode to replace marked text
vnoremap <C-r> "hy:%s/<C-r>h//gc<left><left><left>

" Move using hjkl in insert mode (NOT USED / Commented it out atm)
"inoremap <C-k> <Up>
"inoremap <C-j> <Down>
"inoremap <C-h> <Left>
"inoremap <C-l> <Right>

"""""""""""""""""""""""""""
" Vim Settings
"""""""""""""""""""""""""""

" disable bells
autocmd! GUIEnter * set vb t_vb=

" Do not make vim compatible with vi.
set nocompatible

" Do not create .swp files
set noswapfile

" Number the lines.
set number

" Enable mouse pointing
set mouse=a

" ALWAYS spaces
set expandtab

" Fix backspace behavior 
set backspace=indent,eol,start

" Use system clipboard 
set clipboard+=unnamed

" Keep Undo history on buffer change
set hidden

" Reload files after change on Disk
"set autoread
"au CursorHold * checktime

" Turn on syntax hightlighting.
set syntax=on
set nowrap
set tabstop=2
set shiftwidth=2
set nocindent

"""""""""""""""""""""""""""
" Plugin Settings
"""""""""""""""""""""""""""

" Shows tabs open using airline.
let g:airline#extensions#tabline#enabled = 1