aboutsummaryrefslogtreecommitdiff
path: root/raspberry/.config/nvim/init.vim
blob: 98bd4ef6cd730a3ff4498fde1ddff236595cc05a (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
47
48
49
50
51
52
53
54
" Neovim minimal configuration for raspberry pi
" TODO: find a way re-use the main config

" Enter the current millenium
set nocompatible
syntax enable
filetype plugin on

" General stuff
set number relativenumber
set ignorecase smartcase
set splitbelow splitright
set termguicolors
set cursorline
set hidden
set nowrap
set ruler
set mouse=a
set clipboard=unnamedplus
set scrolloff=3
set conceallevel=0

" Indentation
set smarttab expandtab
set smartindent autoindent
set tabstop=2
set shiftwidth=2
set showtabline=2

" Built-in fuzzy-finder
set path=.,**
set wildmenu
set wildignore+=**/node_modules/**,**/build/**,**/dist/**,**/__pycache__/**
set wildmode=longest,list,full

" Easier window navigation
nnoremap <c-h> <C-w>h
nnoremap <c-j> <C-w>j
nnoremap <c-k> <C-w>k
nnoremap <c-l> <C-w>l

" Easier indentation
vnoremap < <gv
vnoremap > >gv

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

" Vimrc management
nnoremap <leader>ev :vs $MYVIMRC<CR>
nnoremap <leader>sv :source $MYVIMRC<CR>

" Colorscheme
colorscheme murphy