-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.vim
109 lines (95 loc) · 2.51 KB
/
init.vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
"VimPlug
call plug#begin()
Plug 'bling/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'sheerun/vim-polyglot'
Plug 'tpope/vim-endwise'
Plug 'scrooloose/nerdcommenter'
Plug 'tpope/vim-surround'
Plug 'jiangmiao/auto-pairs'
Plug 'airblade/vim-gitgutter'
Plug 'bronson/vim-trailing-whitespace'
Plug 'vim-scripts/DeleteTrailingWhitespace'
Plug 'chriskempson/vim-tomorrow-theme'
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
Plug 'junegunn/fzf.vim'
Plug 'christoomey/vim-tmux-navigator'
Plug 'scrooloose/nerdtree'
Plug 'freitass/todo.txt-vim'
Plug 'godlygeek/tabular'
call plug#end()
"General
set autoread
set autoindent
set incsearch "Move cursor to search result as you type
set autoindent "Autoindentation
set smartindent
set shiftwidth=2
set softtabstop=2
set expandtab
set ignorecase "Search is not case sensitive
set wildmenu "Wildmenu on
set wildmode=longest,full
set backspace=eol,start,indent
set relativenumber
set nocompatible
set encoding=utf-8
set clipboard=unnamed
set splitbelow
set splitright
filetype off
filetype plugin indent on
"Remapping
let mapleader="\<Space>"
let maplocalleader = "\<Space>"
nnoremap <Leader>q :q!<CR>
nnoremap <Leader>w :w!<CR>
nnoremap <C-J> <C-W><C-J>
nnoremap <C-K> <C-W><C-K>
nnoremap <C-L> <C-W><C-L>
nnoremap <C-H> <C-W><C-H>
imap jj <Esc>
"Cosmetic
set termguicolors
syntax enable
colorscheme Tomorrow-Night-Eighties
set t_Co=256
set number "Line Numbers
set ts=2 "Smaller tab size
set tabstop=2
set cmdheight=2 "Height of the cmd line
set lbr "Linebreak on 500 chars
set tw=500
set cursorline "Cursor line highlighted
set hlsearch "Highlight search result
set showcmd "Command in bottom bar
set linespace=0 "No spacing between lines
set showmatch "Show matching parenthesis and brackets
"Airline
set laststatus=2
let g:airline_left_sep = ''
let g:airline_left_sep = ''
let g:airline_right_sep = ''
let g:airline_right_sep = ''
let g:airline_theme="tomorrow"
let g:airline_powerline_fonts=1
"indent file
nnoremap <Leader>i gg=G''zz
nnoremap <C-P> :Files<CR>
"colorcolumn
set colorcolumn=+1
hi ColorColumn guibg=#1D8348
"Disable backups and swapfiles
set nobackup
set nowritebackup
set noswapfile
"Intellij
nmap ,c :action GotoClass<CR>
nmap ,f :action GotoFile<CR>
nmap ,s :action GotoSymbol<CR>
nmap ,a :action GotoAction<CR>
nmap <C-'> :action FileStructurePopup<CR>
nmap grc :action Git.ResolveConflicts<CR>
nmap cg :action Generate<CR>
nmap <S-R> :action RenameElement<CR>
nmap <C-Q> :action QuickJavaDoc<CR>