Created
September 20, 2024 17:40
-
-
Save glassresistor/0a36efa4b5ba7508dda59e1db64fe56b to your computer and use it in GitHub Desktop.
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
execute pathogen#infect() | |
syntax on | |
filetype indent plugin on | |
set nocompatible | |
set nu | |
set mouse=ar mousemodel=extend | |
set wildmode=longest,list,full | |
set wildmenu | |
set fileformat=unix | |
set fileformats=unix | |
nmap <F1> <nop | |
nnoremap <C-J> <C-W><C-J> | |
nnoremap <C-K> <C-W><C-K> | |
nnoremap <C-L> <C-W><C-L> | |
nnoremap <C-H> <C-W><C-H> | |
if exists('loaded_trailing_whitespace_plugin') | finish | endif | |
let loaded_trailing_whitespace_plugin = 1 | |
" Highlight EOL whitespace, http://vim.wikia.com/wiki/Highlight_unwanted_spaces | |
highlight ExtraWhitespace ctermbg=darkred guibg=#382424 | |
autocmd ColorScheme * highlight ExtraWhitespace ctermbg=red guibg=red | |
autocmd BufWinEnter * match ExtraWhitespace /\s\+$/ | |
" The above flashes annoyingly while typing, be calmer in insert mode | |
autocmd InsertLeave * match ExtraWhitespace /\s\+$/ | |
autocmd InsertEnter * match ExtraWhitespace /\s\+\%#\@<!$/ | |
function! s:FixWhitespace(line1,line2) | |
let l:save_cursor = getpos(".") | |
silent! execute ':' . a:line1 . ',' . a:line2 . 's/\s\+$//' | |
call setpos('.', l:save_cursor) | |
endfunction | |
" Run :FixWhitespace to remove end of line white space | |
command! -range=% FixWhitespace call <SID>FixWhitespace(<line1>,<line2>) | |
autocmd BufWritePre if search(':wq', 'n') | setl readonly | endif | |
let g:goog_user_conf = { 'langpair' : 'sp:en', 'cmd': 'node', 'v_key': 'T' } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment