Skip to content
This repository has been archived by the owner on Sep 26, 2021. It is now read-only.

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
haininhhoang94 committed Mar 2, 2021
1 parent 10ecc21 commit b94c778
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
20 changes: 10 additions & 10 deletions general/functions.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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 <f10> :echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . '> trans<'
\ . synIDattr(synID(line("."),col("."),0),"name") . "> lo<"
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion init.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
8 changes: 4 additions & 4 deletions keys/mappings.vim
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ noremap <Right> <NOP>
" Experimental
" Ctrl+ J when split a line
nnoremap <NL> i<CR><ESC>
" nnoremap <NL> i<CR><ESC>

if exists('g:vscode')
" Simulate same TAB behavior in VSCode
Expand All @@ -30,9 +30,9 @@ else
" SHIFT-TAB will go back
nnoremap <silent> <S-TAB> :bprevious<CR>
" Insert newline without entering insert mode
nmap <C-o> O<Esc>
nmap <CR> o<Esc>
" " Insert newline without entering insert mode
" nmap <C-o> O<Esc>
" nmap <CR> o<Esc>

" Alternative way to save
nnoremap <silent> <C-s> :w<CR>
Expand Down
2 changes: 1 addition & 1 deletion vim-plug/plugins.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down

0 comments on commit b94c778

Please sign in to comment.