set nocompatible filetype plugin on syntax on set fileformat=unix set encoding=utf8 set relativenumber set wrap set tabstop=4 set shiftwidth=4 set softtabstop=4 "set expandtab set smarttab set autoindent set colorcolumn=80 highlight ColorColumn ctermbg=8 set clipboard^=unnamed,unnamedplus set list listchars=tab:>-,trail:_,extends:>,precedes:<,nbsp:~ set showbreak=> let mapleader=" " " Return to last edit position when opening files (You want this!) autocmd BufReadPost * \ if line("'\"") > 0 && line("'\"") <= line("$") | \ exe "normal! g`\"" | \ endif " Start NERDTree and put the cursor back in the other window. autocmd VIMENTER * NERDTree | wincmd p " open in new tab " let NERDTreeMapOpenInTab='' " toggle with \ nnoremap \ :NERDTreeToggle % " close NERDTree on file close autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") \ && b:NERDTree.isTabTree()) | q | endif " plugins call plug#begin('~/local/share/nvim/plugged') Plug 'vimwiki/vimwiki' Plug 'preservim/nerdtree' Plug 'Xuyuanp/nerdtree-git-plugin' Plug 'junegunn/goyo.vim' Plug 'christoomey/vim-tmux-navigator' call plug#end() " spelling map :setlocal spell! spelllang=gb " disable macro mode map q " remove arrow keys " nmap " nmap " nmap " nmap " better nav between splits nnoremap nnoremap nnoremap nnoremap " tabs nnoremap 1 1gt nnoremap 2 2gt nnoremap 3 3gt nnoremap 4 4gt nnoremap 5 5gt nnoremap 6 6gt nnoremap 7 7gt nnoremap 8 8gt nnoremap 9 9gt nnoremap 0 :tablast autocmd BufEnter,BufRead,BufNewFile *.md set filetype=markdown set rtp+=$HOMEBREW_PREFIX/opt/fzf