Last active
August 24, 2021 05:27
-
-
Save pgkt04/c14c2e1d4832a66b66cb0e48e081a39d to your computer and use it in GitHub Desktop.
nvim settings
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
syntax on | |
filetype plugin indent on | |
" Disable sounds | |
set visualbell | |
" https://github.com/geohot/configuration/blob/master/.vimrc | |
set tabstop=2 | |
set shiftwidth=2 | |
set expandtab | |
set number | |
set ai | |
set ruler | |
set hlsearch | |
" Ignore case unless upper case is present in query | |
set ignorecase smartcase | |
" Begin searching while typing | |
set incsearch hlsearch | |
" Allow the use of the mouse https://stackoverflow.com/questions/7225057/use-mouse-scroll-wheel-in-vim | |
set mouse=a | |
" Ctrl backspace delete previous word | |
noremap! <C-BS> <C-w> | |
noremap! <C-h> <C-w> | |
" Pastel theme | |
colorscheme peachpuff | |
" Dark highlighting | |
highlight Visual cterm=NONE ctermfg=NONE ctermbg=237 guibg=#3a3a3a | |
highlight Search cterm=NONE ctermfg=NONE ctermbg=237 guibg=#3a3a3a | |
" Light Highlighting | |
" hi Visual cterm=NONE ctermfg=NONE ctermbg=223 guibg=#ffd7af | |
" hi Search cterm=NONE ctermfg=NONE ctermbg=223 guibg=#ffd7af | |
" | |
" Green comments | |
highlight Comment ctermfg=green | |
" Enable pasting on f2 | |
set pastetoggle=<F2> | |
" WSL Yank support | |
set clipboard+=unnamedplus | |
let g:clipboard = { | |
\ 'name': 'win32yank-wsl', | |
\ 'copy': { | |
\ '+': 'win32yank.exe -i --crlf', | |
\ '*': 'win32yank.exe -i --crlf', | |
\ }, | |
\ 'paste': { | |
\ '+': 'win32yank.exe -o --lf', | |
\ '*': 'win32yank.exe -o --lf', | |
\ }, | |
\ 'cache_enabled': 0, | |
\ } | |
" change this path according to your mount point | |
let s:clip = '/mnt/c/Windows/System32/clip.exe' | |
if executable(s:clip) | |
augroup WSLYank | |
autocmd! | |
" Call twice to fix some weird bug | |
autocmd TextYankPost * if v:event.operator ==# 'y' | call system(s:clip, @0) | endif | |
autocmd TextYankPost * if v:event.operator ==# 'y' | call system(s:clip, @0) | endif | |
augroup END | |
endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment