summaryrefslogtreecommitdiff
path: root/neovim/.config/nvim/confs/generic.vim
blob: f241bfdcf46d000cfdc85ba30d2ece04a36c6ccd (plain)
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
set number
set ignorecase
set viminfo=""
set autoindent
set smartindent
set smarttab
set ruler
set autochdir
set mouse=a
" set guicursor=
set inccommand=split
set incsearch
set wildmode=longest,list,full
set relativenumber
set termguicolors
set complete=.,w,b,u,t
set completeopt=menuone,noselect

" Leader Key
let mapleader="/"

" Remove trailing whitespace on save
autocmd BufWritePre * %s/\s\+$//e

" Use system clipboard
set clipboard+=unnamedplus

" Move between splits
map <A-h> <C-w>h
map <A-j> <C-w>j
map <A-k> <C-w>k
map <A-l> <C-w>l

" Splits position

" Auto Indent
map <Tab> gg=G

" Check Spelling
map <leader>lp :set spell spelllang=pt_pt <CR>
map <leader>le :set spell spelllang=en_us <CR>
map <leader>ls :set nospell <CR>

" Custom Scripts
map <F5> :!compiler '%' $(pwd) <CR>
map <F4> :!clear && shellcheck % <CR>