Skip to content

Instantly share code, notes, and snippets.

@chrissorchard
Last active August 19, 2020 20:42
Show Gist options
  • Save chrissorchard/5474419 to your computer and use it in GitHub Desktop.
Save chrissorchard/5474419 to your computer and use it in GitHub Desktop.
my vimrc
colorscheme desert
set wildmode=longest,list
set tabstop=4
filetype indent on
set expandtab
set mouse=a
set sw=4
filetype plugin on
command WQ wq
command Wq wq
command W w
command Q q
map <C-N> :tabn<CR>
map <C-P> :tabp<CR>
syntax on
set incsearch
set smartcase
set confirm
set tabpagemax=30
syntax on
map <C-T> :tabnew<CR>:o .<CR>
inoremap <expr> <C-Space> pumvisible() \|\| &omnifunc == '' ?
\ "\<lt>C-n>" :
\ "\<lt>C-x>\<lt>C-o><c-r>=pumvisible() ?" .
\ "\"\\<lt>c-n>\\<lt>c-p>\\<lt>c-n>\" :" .
\ "\" \\<lt>bs>\\<lt>C-n>\"\<CR>"
imap <C-@> <C-Space>
function! WC()
let filename = expand("%")
let cmd = "detex " . filename . " | wc -w | tr -d [:space:]"
let result = system(cmd)
echo result . " words"
endfunction
command WC call WC()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment