From aefe47097d4cdeb786096c7188650d9e61418bc7 Mon Sep 17 00:00:00 2001 From: Jonathan Hodgson Date: Sat, 7 Jul 2018 13:41:50 +0100 Subject: [PATCH] Add shortcut to bind this to functions in js --- .vimrc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.vimrc b/.vimrc index 1034812..5092270 100644 --- a/.vimrc +++ b/.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 b Ithis.^y$$a = pa.bind(this); +" js maps {{{2 +augroup javascript + autocmd! + "binds this in class + autocmd FileType javascript nnoremap b Ithis.^y$$a = pa.bind(this); +augroup END + " Add Html maps, Currently only pandoc conversion {{{2 augroup html autocmd!