jceb / vim-orgmode

Text outlining and task management for Vim based on Emacs' Org-Mode
http://www.vim.org/scripts/script.php?script_id=3642
Other
3.1k stars 266 forks source link

Text Objects: `ir` (inner subtree) acts like `ih` (inner heading) #273

Closed rlue closed 6 years ago

rlue commented 7 years ago

Just downloaded and installed the latest version of vim-orgmode, but am finding that the ir text object behaves strangely.

vir

Specifically, visual select works as expected,

* Heading 1           ──┐
  - [ ] list item     <-+-- with the cursor here...
** Subheading 1         │
** Subheading 2         │   ...`vir` selects all this
   - [ ] list item      │
*** Sub-subheading 1    │
** Subheading 3       ──┘
* Heading 2

Everything else

...but for all other operations (dir, yir, cir, or even ysir with tpope's vim-surround), ir does the same as ih:

* Heading 1           ──┐
  - [ ] list item     ──┘   but `dir` only deletes this.
** Subheading 1
** Subheading 2       
   - [ ] list item    
*** Sub-subheading 1  
** Subheading 3      
* Heading 2
lanker commented 6 years ago

https://github.com/jceb/vim-orgmode/pull/284