Add shortcut to bind this to functions in js

master
Jonathan Hodgson 7 years ago
parent 7f2760992d
commit aefe47097d
  1. 9
      .vimrc

@ -400,6 +400,7 @@ iabbrev @@ jonathan@fellowshipproductions.co.uk
iabbrev @@@ jonathan@lunarweb.co.uk
" Start Screen Settings {{{1
fun! Start()
" Don't run if: we have commandline arguments, we don't have an empty
@ -449,6 +450,14 @@ augroup file_web
autocmd FileType html,xhtml,css,less,javascript,php EmmetInstall
augroup END
nnoremap <localleader>b Ithis.^y$$a = pa.bind(this);
" js maps {{{2
augroup javascript
autocmd!
"binds this in class
autocmd FileType javascript nnoremap <localleader>b Ithis.^y$$a = pa.bind(this);
augroup END
" Add Html maps, Currently only pandoc conversion {{{2
augroup html
autocmd!

Loading…
Cancel
Save