Add shortcut to bind this to functions in js

This commit is contained in:
Jonathan Hodgson 2018-07-07 13:41:50 +01:00
parent 7f2760992d
commit aefe47097d

9
.vimrc
View file

@ -400,6 +400,7 @@ iabbrev @@ jonathan@fellowshipproductions.co.uk
iabbrev @@@ jonathan@lunarweb.co.uk iabbrev @@@ jonathan@lunarweb.co.uk
" Start Screen Settings {{{1 " Start Screen Settings {{{1
fun! Start() fun! Start()
" Don't run if: we have commandline arguments, we don't have an empty " 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 autocmd FileType html,xhtml,css,less,javascript,php EmmetInstall
augroup END 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 " Add Html maps, Currently only pandoc conversion {{{2
augroup html augroup html
autocmd! autocmd!