This repository was archived by the owner on Jan 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathneovimrc.vim
106 lines (92 loc) · 2.44 KB
/
neovimrc.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
" Name: neovimrc.vim
" Author: Alek Mugnozzo
" E-mail: info@mugnozzo.net
" Website: mugnozzo.xyz
" License: GNU GPLv3.0
" Hosted at: https://github.com/mugnozzo/vimrc
syntax on
set ignorecase
set smartcase
set incsearch
set hlsearch
set autoindent
set cindent
set number
set relativenumber
set hidden
" FOLDING
set foldenable
set foldmethod=indent
set foldlevel=99
" INDENTATION
set tabstop=4
set softtabstop=0
set expandtab
set shiftwidth=4
syntax on
" MAPLEADER
let mapleader=" "
" NAVIGATION
nnoremap <leader>h :wincmd h<CR>
nnoremap <leader>j :wincmd j<CR>
nnoremap <leader>k :wincmd k<CR>
nnoremap <leader>l :wincmd l<CR>
nnoremap <leader>r :wincmd r<CR>
nnoremap <leader>R :wincmd R<CR>
" b is for buffer
nnoremap <leader>bn :bn<CR>
nnoremap <leader>bp :bp<CR>
nnoremap <leader>bb :buffer
nnoremap <leader>bl :buffers<CR>
" d is for directories
nnoremap <leader>dd :Lexplore<CR>
" RESIZING
" z is to manage the size of the windows
nnoremap <leader>zz <C-W>=
nnoremap <leader>zZ :resize \| :vertical resize<CR>
nnoremap <leader>zj :resize +5<CR>
nnoremap <leader>zk :resize -5<CR>
nnoremap <leader>zl :vertical resize +5<CR>
nnoremap <leader>zh :vertical resize -5<CR>
" SELECTING/COPYING/PASTING
nnoremap <leader>a ggVG
nnoremap <leader>ya ggVG"*yggVG"+y
nnoremap <leader>p "+p
nnoremap <leader>P "*p
" TELESCOPE
map <leader>tt :Telescope<CR>
map <leader>tb :Telescope buffers<CR>
map <leader>tf :Telescope find_files<CR>
map <leader>tg :Telescope live_grep<CR>
map <leader>tr :Telescope registers<CR>
" MISC
" c is for code management
map <leader>ce :Emmet
" FILETYPES
autocmd BufNew,BufNewFile,BufRead *.html.twig :set filetype=html
autocmd BufNew,BufNewFile,BufRead *.phtml :set filetype=html
autocmd BufWritePost *.scss !sassc "%:p" "%:p:r.css" > /tmp/tmp_sass_output.txt
" APPEARANCE
colorscheme desert
highlight Normal ctermbg=233 guibg=#000000
highlight LineNr cterm=bold ctermfg=226
highlight LineNrAbove cterm=none ctermfg=227
highlight LineNrBelow cterm=none ctermfg=227
highlight NonText ctermbg=234
" MISC
map <leader>n :noh<CR>
map <leader>N :set relativenumber!<CR>
" PLUGINS
call plug#begin()
Plug 'BurntSushi/ripgrep'
Plug 'neovim/nvim-lspconfig'
Plug 'nvim-lua/plenary.nvim'
Plug 'nvim-telescope/telescope.nvim'
Plug 'sharkdp/fd'
Plug 'preservim/nerdtree'
Plug 'nvim-treesitter/nvim-treesitter'
Plug 'lukas-reineke/indent-blankline.nvim'
Plug 'neomake/neomake'
Plug 'tpope/vim-fugitive'
Plug 'mattn/emmet-vim'
call plug#end()