Skip to content

Commit

Permalink
add ExistingOrNewTab comands
Browse files Browse the repository at this point in the history
  • Loading branch information
divramod committed Oct 16, 2019
1 parent e8963d5 commit 561bbde
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,16 @@ RangerCurrentFile // Default Ranger behaviour
RangerCurrentDirectory
RangerWorkingDirectory
// open always in new tabs
RangerNewTab
RangerCurrentFileNewTab
RangerCurrentDirectoryNewTab
RangerWorkingDirectoryNewTab
// open tab, when existant or in new tab when not existant
RangerCurrentFileExistingOrNewTab
RangerCurrentDirectoryExistingOrNewTab
RangerWorkingDirectoryExistingOrNewTab
```

The old way to make vim open the selected file in a new tab was to add
Expand Down
3 changes: 3 additions & 0 deletions plugin/ranger.vim
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,11 @@ command! Ranger RangerCurrentFile

" To open the selected file in a new tab
command! RangerCurrentFileNewTab call OpenRangerIn("%", 'tabedit ')
command! RangerCurrentFileExistingOrNewTab call OpenRangerIn("%", 'tab drop ')
command! RangerCurrentDirectoryNewTab call OpenRangerIn("%:p:h", 'tabedit ')
command! RangerCurrentDirectoryExistingOrNewTab call OpenRangerIn("%:p:h", 'tab drop ')
command! RangerWorkingDirectoryNewTab call OpenRangerIn(".", 'tabedit ')
command! RangerWorkingDirectoryExistingOrNewTab call OpenRangerIn(".", 'tab drop ')
command! RangerNewTab RangerCurrentDirectoryNewTab

" For retro-compatibility
Expand Down

0 comments on commit 561bbde

Please sign in to comment.