-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.vim
More file actions
150 lines (121 loc) · 3.66 KB
/
init.vim
File metadata and controls
150 lines (121 loc) · 3.66 KB
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
call plug#begin('~/.vim/plugged')
Plug 'pangloss/vim-javascript'
Plug 'mxw/vim-jsx'
Plug 'chase/vim-ansible-yaml'
Plug 'nvim-lualine/lualine.nvim'
Plug 'Raimondi/delimitMate'
Plug 'hail2u/vim-css3-syntax'
Plug 'othree/html5.vim'
Plug 'brenoprata10/nvim-highlight-colors'
Plug 'gcorne/vim-sass-lint'
Plug 'AndrewRadev/splitjoin.vim'
Plug 'ryanoasis/vim-devicons'
Plug 'MarcWeber/vim-addon-mw-utils'
" Plug 'tomtom/tlib_vim'
Plug 'activebridge/rails-snippets'
Plug 'honza/vim-snippets'
Plug 'p0deje/vim-ruby-interpolation'
Plug 'mg979/vim-visual-multi', { 'branch': 'master' }
Plug 'tpope/vim-rails'
Plug 'tpope/vim-endwise'
Plug 'tpope/vim-ragtag'
Plug 'tpope/vim-haml'
Plug 'tpope/vim-commentary'
Plug 'vim-scripts/grep.vim'
Plug 'vim-scripts/EasyGrep'
Plug 'vim-scripts/LargeFile'
Plug 'vim-scripts/L9'
Plug 'vim-scripts/Toggle'
Plug 'vim-scripts/surround.vim'
Plug 'vim-scripts/rainbow-end'
Plug 'vim-scripts/vim-qf'
Plug 'w0rp/ale'
Plug 'nvim-lua/plenary.nvim' " dependency for telescope
Plug 'nvim-treesitter/nvim-treesitter', { 'do': ':TSUpdate' } " dependency for telescope
Plug 'nvim-telescope/telescope.nvim'
Plug 'echasnovski/mini.starter', { 'branch': 'stable' }
Plug 'preservim/nerdtree'
Plug 'airblade/vim-localorie'
Plug 'lewis6991/gitsigns.nvim'
Plug 'joshdick/onedark.vim'
Plug 'miyakogi/conoline.vim'
call plug#end()
set termguicolors " enable true colors support
colorscheme onedark
set guifont=Monospace:h13 " Font
set number
set expandtab ts=2 sw=2 ai " Two spaces instead tab
set nobackup " Don't make a backup before overwriting a file.
set nowritebackup " And again.
set noswapfile
set list
set listchars=trail:• " Show spaces in end of line
set clipboard=unnamedplus
set scrolloff=10 " Show 3 lines of context around the cursor.
set autoread
au FocusGained * :checktime
map gitk :!gitk %:p &<cr><ESC>
map <C-s> :w<cr>
imap <C-s> <ESC>:w<cr>
map <C-a> <esc>ggVG<end>
vnoremap < <gv
vnoremap > >gv
" Startify
let g:startify_change_to_dir = 0
lua require('mini.starter').setup()
" Bubble single&multiple lines
vnoremap <D-Up> <esc>`<gv:m '<-2<cr>gv
vnoremap <D-Down> <esc>`>gv:m '>+1<cr>gv
nnoremap <D-Up> mz:m-2<cr>`z
nnoremap <D-Down> mz:m+<cr>`z
" ALE
let g:ale_fix_on_save = 1
let g:lint_on_insert_leave = 1
let g:lint_on_text_changed = 0
" let g:ale_sign_column_always=1"
"
" Rgrep
map <C-f> :Rgrep<cr>
let Grep_Default_Filelist = '*.*'
let Grep_Skip_Files = '*.log *.sql *.png *.jpg *.jpeg *.gif'
let Grep_Skip_Dirs = '.git tmp coverage log solr public _site node_modules'
" Telescope
nnoremap <D-o> <cmd>Telescope find_files<cr>
nnoremap <S-tab> <cmd>Telescope buffers<cr>
" Highlight cursor (only for current window)
let g:conoline_auto_enable = 1
let g:conoline_use_colorscheme_default_normal=1
let g:conoline_use_colorscheme_default_insert=1
" Commentary
map <C-c> <esc>gcc<end>
map <C-x> <esc>gcu<end>
vmap <C-c> gc
map cp "+y<CR>
" NERDTree
map <F2> :NERDTreeToggle<cr>
map gt :NERDTreeFind<cr>
let NERDTreeAutoDeleteBuffer = 1
" Gitsigns
lua require('gitsigns').setup()
" Lualine
lua require('lualine').setup()
" nvim-highlight-colors
set t_Co=256
lua require("nvim-highlight-colors").setup { enable_tailwind = true }
lua require("nvim-highlight-colors").turnOn()
" Rails
map gV :Eview<CR>
map gC :Econtroller<CR>
map gM :Emodel<CR>
map gH :Ehelper<CR>
map gJ :Ejavascript<CR>
map gS :Estylesheet<CR>
" vim-localorie
nnoremap <silent> lt :call localorie#translate()<CR>
autocmd CursorMoved *.yml echo localorie#expand_key()
autocmd BufWritePre *.* :%s/\s\+$//e
cmap <S-Insert> <C-R>+
if exists("+undofile")
set udf
set undodir=~/.vim/undo
endif