From 383f2a7b645b085a428b3ac04f0fc4a000a8e2ba Mon Sep 17 00:00:00 2001 From: Akshay Date: Thu, 5 Nov 2020 09:03:21 +0530 Subject: add backquote text objs --- doc/better-text-objs.txt | 18 +++++++++++++----- plugin/better-text-objs.vim | 8 ++++++++ 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/doc/better-text-objs.txt b/doc/better-text-objs.txt index 7a83d25..65fd191 100644 --- a/doc/better-text-objs.txt +++ b/doc/better-text-objs.txt @@ -11,11 +11,12 @@ decided to package them into a plugin. ============================================================================== OVERVIEW *better-text-objs-overview* -Pair |better-text-objs-pair| -Line |better-text-objs-line| -Number |better-text-objs-number| -Buffer |better-text-objs-buffer| -Indent |better-text-objs-indent| +Pair |better-text-objs-pair| +Line |better-text-objs-line| +Backquote |better-text-objs-backquote| +Number |better-text-objs-number| +Buffer |better-text-objs-buffer| +Indent |better-text-objs-indent| ============================================================================== PAIR *better-text-objs-pair* @@ -33,6 +34,13 @@ LINE *better-text-objs-line* Text objects to represent in and around the current line. +============================================================================== +BACKQUOTE *better-text-objs-backquote* + +`ix ax` + +Aliases for inner backquote and around backquote. + ============================================================================== NUMBER *better-text-objs-number* diff --git a/plugin/better-text-objs.vim b/plugin/better-text-objs.vim index e959e6e..4cb0acd 100644 --- a/plugin/better-text-objs.vim +++ b/plugin/better-text-objs.vim @@ -19,6 +19,14 @@ onoremap il :normal vil xnoremap al $o0 onoremap al :normal val +" backquote text objects +" ----------------- +" ix ax +xnoremap ix :normal vi` +onoremap ix :normal vi` +xnoremap ax :normal va` +onoremap ax :normal va` + " number text object (integer and float) " -------------------------------------- " in -- cgit v1.2.3