From b94c7786e2c9ffb1951dfaad3b91d6d1a5ca762b Mon Sep 17 00:00:00 2001 From: Hai Ninh Hoang Date: Tue, 2 Mar 2021 16:48:36 +0700 Subject: [PATCH] updates --- general/functions.vim | 20 ++++++++++---------- init.vim | 2 +- keys/mappings.vim | 8 ++++---- vim-plug/plugins.vim | 2 +- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/general/functions.vim b/general/functions.vim index 607a774..90ea20a 100644 --- a/general/functions.vim +++ b/general/functions.vim @@ -2,9 +2,9 @@ " Turn spellcheck on for markdown files, and turn on indent augroup auto_spellcheck - autocmd BufNewFile,BufRead *.md setlocal spell - autocmd BufNewFile,BufRead *.md setlocal tabstop=2 - autocmd BufNewFile,BufRead *.md setlocal shiftwidth=2 + " autocmd BufNewFile,BufRead *.md setlocal spell + autocmd BufNewFile,BufRead *.md set tabstop=2 + autocmd BufNewFile,BufRead *.md set shiftwidth=2 nnoremap :echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . '> trans<' \ . synIDattr(synID(line("."),col("."),0),"name") . "> lo<" @@ -23,13 +23,13 @@ function! Light() endfunction " WSL yank support -let s:clip = '/mnt/c/Windows/System32/clip.exe' " change this path according to your mount point -if executable(s:clip) - augroup WSLYank - autocmd! - autocmd TextYankPost * if v:event.operator ==# 'y' | call system('cat |' . s:clip, @0) | endif - augroup END -endif +" let s:clip = '/mnt/c/Windows/System32/clip.exe' " change this path according to your mount point +" if executable(s:clip) +" augroup WSLYank +" autocmd! +" autocmd TextYankPost * if v:event.operator ==# 'y' | call system('cat |' . s:clip, @0) | endif +" augroup END +" endif " If one has a particular extension that one uses for binary files (such as exe, " bin, etc), you may find it helpful to automate the process with the following diff --git a/init.vim b/init.vim index 13a9cf2..e8f8ddb 100644 --- a/init.vim +++ b/init.vim @@ -53,6 +53,7 @@ else source $HOME/.config/nvim/plug-config/asynctask.vim source $HOME/.config/nvim/plug-config/window-swap.vim source $HOME/.config/nvim/plug-config/jsonc.vim + source $HOME/.config/nvim/plug-config/markdown-preview.vim source $HOME/.config/nvim/plug-config/neovide.vim luafile $HOME/.config/nvim/lua/plug-colorizer.lua " Graveyard @@ -70,7 +71,6 @@ else " source $HOME/.config/nvim/plug-config/xtabline.vim " source $HOME/.config/nvim/plug-config/illuminate.vim " source $HOME/.config/nvim/plug-config/sneak.vim - " source $HOME/.config/nvim/plug-config/markdown-preview.vim " source $HOME/.config/nvim/plug-config/markdown-img-paste.vim endif source $HOME/.config/nvim/plug-config/quickscope.vim diff --git a/keys/mappings.vim b/keys/mappings.vim index de67029..e1e2db7 100644 --- a/keys/mappings.vim +++ b/keys/mappings.vim @@ -11,7 +11,7 @@ noremap " Experimental " Ctrl+ J when split a line -nnoremap i +" nnoremap i if exists('g:vscode') " Simulate same TAB behavior in VSCode @@ -30,9 +30,9 @@ else " SHIFT-TAB will go back nnoremap :bprevious - " Insert newline without entering insert mode - nmap O - nmap o + " " Insert newline without entering insert mode + " nmap O + " nmap o " Alternative way to save nnoremap :w diff --git a/vim-plug/plugins.vim b/vim-plug/plugins.vim index 78b0f1a..a4c85a9 100644 --- a/vim-plug/plugins.vim +++ b/vim-plug/plugins.vim @@ -130,7 +130,7 @@ call plug#begin('~/.config/nvim/autoload/plugged') " Python jupyter " Plug 'goerz/jupytext.vim' " " Markdown Preview - " Plug 'iamcco/markdown-preview.nvim', { 'do': 'cd app & npm install' } + Plug 'iamcco/markdown-preview.nvim', { 'do': 'cd app & npm install' } " " Markdown Image Paste " Plug 'ferrine/md-img-paste.vim'