dotfiles

My dotfiles
git clone git://src.gearsix.net/dotfiles
Log | Files | Refs | Atom

nvimrc (2311B)


      1 "========================
      2 " gearsix
      3 " nvimrc
      4 " 0. VIM-PLUG
      5 " 1. GENERAL
      6 " 2. COLOURS
      7 " 3. SPACES & TABS
      8 " 4. UI
      9 " 5. SEARCH	
     10 " 6. FOLDING
     11 " 7. TEXT WRAPPING
     12 " 8. SHORTCUTS
     13 " 9. netrw
     14 "========================
     15 
     16 "0. VIM-PLUG
     17 "sh -c 'curl -fLo ${XDG_DATA_HOME:-$HOME/.local/share}/nvim/site/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
     18 "call plug#begin('~/.local/share/nvim/plugged')
     19 	"Plug 'githubuser/repo'
     20 "call plug#end()
     21 
     22 "1. GENERAL
     23 	set history=500			"how many lines of history to remember
     24 	set autoread			"read a file if it's changed from the outside
     25 	set ffs=unix,dos,mac	"filetype priority
     26 
     27 "2. COLOURS
     28 	syntax enable
     29 	set background=dark
     30 	silent! colorscheme acme
     31 
     32 "3. SPACES & TABS
     33 	set tabstop=4		"number of visual spaces per tab
     34 	set softtabstop=4	"number of spaces in a tab when editing
     35 	set shiftwidth=4	"number of spaces when shifting a visual block
     36 	"set expandtab		"tabs to spaces
     37 
     38 "4. UI
     39 	set number			"show numbers on in the margin
     40 	set showcmd			"show cmdline in the bottom bar
     41 	set cmdheight=1		"height of cmdline
     42 	set cursorline		"highlight current line
     43 	"set wildmenu		"visual autocomplete for cmd menu
     44 	set showmatch		"highlight matching [{()}]
     45 	set laststatus=2	"always show the last status line
     46 	set scrolloff=1     "always show at least one line above/below the cursor
     47 	
     48 "5. SEARCH
     49 	set incsearch		"search as characters are entered
     50 	set hlsearch		"highlight matches
     51 
     52 "6. FOLDING
     53 	set foldmethod=syntax	"fold based on syntax
     54 	set nofoldenable		"enable folding (zc to enable)
     55 	set foldnestmax=4
     56 
     57 "7. TEXT WRAPPING
     58 	set wrap		"enable text wrapping
     59 	set linebreak	"only insert linebreaks when Enter key is pressed
     60 
     61 "8. SHORTCUTS
     62 	", = leader
     63 	let mapleader=","
     64 
     65 	",<space> = turn off search highlights
     66 	nnoremap <leader><space> :nohlsearch<CR>
     67 
     68 	":W = sudo save
     69 	command W w !sudo tee % > /dev/null
     70 
     71 	"<Esc> to exit terminal mode
     72 	":tnoremap <Esc> <C-\><C-n>
     73 
     74 	"vres = vertical res
     75 	cnoreabbrev vres vertical res
     76 
     77 	",! = Vexplore
     78 	nnoremap <leader>! :Vex<CR>
     79 
     80 "9. netrw
     81 	let g:netrw_liststyle = 3    "tree view
     82 	let g:netrw_banner = 0       "remove banner
     83 	let g:netrw_browse_split = 4 "open files in prev. window
     84 	let g:netrw_altv = 1         "change splitting from left -> right
     85 	let g:netrw_winsize = 25     "width = 25% of page
     86