Created
February 23, 2023 00:36
-
-
Save ianchanning/a538b681ad425b529c69da17ff35ac82 to your computer and use it in GitHub Desktop.
VSCode subset of my main .vimrc file
This file contains 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
let data_dir=has('nvim') ? stdpath('data') . '/site' : '~/.vim' | |
if empty(glob(data_dir . '/autoload/plug.vim')) | |
silent execute '!curl -fLo '.data_dir.'/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' | |
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC | |
endif | |
set nocompatible | |
call plug#begin('~/.vim/bundle') | |
Plug 'tpope/vim-sensible' | |
Plug 'tpope/vim-surround' | |
Plug 'tpope/vim-unimpaired' | |
Plug 'tpope/vim-repeat' | |
Plug 'tpope/vim-commentary' | |
call plug#end() | |
nnoremap <space> <nop> | |
let mapleader="\<space>" | |
let g:mapleader="\<space>" | |
try | |
autocmd FileType php setlocal commentstring=\/\/\ %s | |
autocmd FileType javascript setlocal commentstring=\/\/\ %s | |
autocmd FileType reason setlocal commentstring=\/\/\ %s | |
autocmd FileType dosbatch setlocal commentstring=rem\ %s | |
autocmd FileType rust setlocal commentstring=//\ %s | |
catch | |
endtry | |
map <leader>' ysiw' | |
map <leader>" ysiw" | |
map <leader>; A;<esc> | |
map <silent> <leader><cr> :nohlsearch<cr> | |
nnoremap <leader>bb :buffers<cr>:b<space> | |
map <leader>s :w<cr> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment