From cb2fab9067b39e65cc9b1cc086886724355b8b38 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Sat, 19 Jan 2019 10:19:10 -0500 Subject: [PATCH] colorscheme fix, , is leader, new plugins --- .config/nvim/init.vim | 46 ++++++++++++++++++------------------------- 1 file changed, 19 insertions(+), 27 deletions(-) diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index d1cc03e..63e31c4 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -1,21 +1,22 @@ -" _ -" __ _(_)_ __ ___ _ __ ___ -" \ \ / / | '_ ` _ \| '__/ __| -" \ V /| | | | | | | | | (__ -" \_/ |_|_| |_| |_|_| \___| - -let mapleader =" " +let mapleader ="," call plug#begin('~/.config/nvim/plugged') +Plug 'tpope/vim-surround' +Plug 'scrooloose/nerdtree' Plug 'junegunn/goyo.vim' Plug 'PotatoesMaster/i3-vim-syntax' Plug 'jreybert/vimagit' Plug 'LukeSmithxyz/vimling' Plug 'vimwiki/vimwiki' +Plug 'bling/vim-airline' +Plug 'tpope/vim-commentary' call plug#end() +set bg=light +set mouse=a +set nohlsearch +set clipboard=unnamedplus " Some basics: - color peachpuff set nocompatible filetype plugin on syntax on @@ -35,6 +36,10 @@ call plug#end() " Splits open at the bottom and right, which is non-retarded, unlike vim defaults. set splitbelow splitright +" Nerd tree + map :NERDTreeToggle + autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif + " Shortcutting split navigation, saving a keypress: map h map j @@ -52,7 +57,7 @@ call plug#end() nnoremap S :%s//g " Compile document, be it groff/LaTeX/markdown/etc. - map c :w! \| !compiler % + map c :w! \| !compiler % " Open corresponding .pdf/.html or preview map p :!opout % @@ -62,17 +67,11 @@ call plug#end() " Ensure files are read as what I want: let g:vimwiki_ext2syntax = {'.Rmd': 'markdown', '.rmd': 'markdown','.md': 'markdown', '.markdown': 'markdown', '.mdown': 'markdown'} + let g:vimwiki_list = [{'path': '~/vimwiki', 'syntax': 'markdown', 'ext': '.md'}] autocmd BufRead,BufNewFile /tmp/calcurse*,~/.calcurse/notes/* set filetype=markdown autocmd BufRead,BufNewFile *.ms,*.me,*.mom,*.man set filetype=groff autocmd BufRead,BufNewFile *.tex set filetype=tex -" Readmes autowrap text: - autocmd BufRead,BufNewFile *.md set tw=79 - -" Use urlscan to choose and open a url: - :noremap u :w !urlscan -r 'linkhandler {}' - :noremap ,, !urlscan -r 'linkhandler {}' - " Copy selected text to system clipboard (requires gvim/nvim/vim-x11 installed): vnoremap "+y map "+P @@ -86,22 +85,15 @@ call plug#end() autocmd BufWritePre * %s/\s\+$//e " When shortcut files are updated, renew bash and ranger configs with new material: - autocmd BufWritePost ~/.bm* !shortcuts + autocmd BufWritePost ~/.bmdirs,~/.bmfiles !shortcuts " Run xrdb whenever Xdefaults or Xresources are updated. autocmd BufWritePost ~/.Xresources,~/.Xdefaults !xrdb % " Navigating with guides - inoremap /<++>"_c4l - vnoremap /<++>"_c4l - map /<++>"_c4l - - "____ _ _ -"/ ___| _ __ (_)_ __ _ __ ___| |_ ___ -"\___ \| '_ \| | '_ \| '_ \ / _ \ __/ __| - "___) | | | | | |_) | |_) | __/ |_\__ \ -"|____/|_| |_|_| .__/| .__/ \___|\__|___/ - "|_| |_| + inoremap /<++>"_c4l + vnoremap /<++>"_c4l + map /<++>"_c4l """LATEX " Word count: