From 4e5a4e574a0fbea7e517c00d573e321cc9b4dd76 Mon Sep 17 00:00:00 2001 From: xerus2000 <27jf@pm.me> Date: Fri, 12 Jun 2020 17:51:22 +0200 Subject: [PATCH] Nvim: Update config --- .config/nvim/init.vim | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index d3cf498..8c0fbad 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -47,6 +47,7 @@ command! S OpenBrowserSmartSearch " command! GH OpenGithubProject " " QOL +Plug 'farmergreg/vim-lastplace' " Automatically jump to last edit position Plug 'chrisbra/Recover.vim' " Add Recover options for swap files " Remove trailing whitespace on save Plug 'ntpeters/vim-better-whitespace' @@ -122,8 +123,6 @@ autocmd FileType markdown setlocal spell " Spell checking in markdown " Center on insert mode autocmd InsertEnter * norm zz -autocmd BufNew * :0put ='#! '. system('which '. &makeprg) - " }}} " Mappings {{{ @@ -135,9 +134,12 @@ command! FormatJSON %!python -m json.tool " Add shebang - https://www.reddit.com/r/vim/comments/4z7z7s/add_shebang_lines_to_your_vim_files_automatically/d6v7op8 and https://stackoverflow.com/a/52135425 inoreabbrev #!! "#!/usr/bin/env" . (empty(&filetype) ? '' : ' '.&filetype) -autocmd BufNewFile * if !empty(&filetype) | execute 'silent! 1s/.*/#!\/usr\/bin\/' . &filetype . '\r\r'| :startinsert | endif +"autocmd BufNewFile * if !empty(&filetype) | execute 'silent! 1s/.*/#!\/usr\/bin\/' . &filetype . '\r\r'| :startinsert | endif +" Sane yanking map Y y$ +" Disable Ex mode - https://vi.stackexchange.com/q/457 +nnoremap Q let mapleader=" "