Skip to main content
deleted 10 characters in body
Source Link
mrajner
  • 213
  • 1
  • 6

you can also adapt this one liner

command -range TmuxSession letexecute @a='"!tmux.session '" . substitute(@*,"\n"," ","g") | @a

or if you do not need multiline visual selection change @* to substitute(@*,"\n"," ","g")

command -range TmuxSession let @a='!tmux.session ' . @* | @a

The @* register stores current selection. So you can join selected text to any other register with your custom command (a in this examplefor linux, note that you will lost this register texton windows there could be different naming convention) and then execute it.

The -range is only to avoid an error if you want to execute this command with range marks, i.e. '<,'>TmuxSession.

@* is current selection for linux, on windows there could be different naming convention.

EDIT: easier and not overwritting any register

command -range TmuxSession execute "!tmux.session " . @*

you can also adapt this one liner

command -range TmuxSession let @a='!tmux.session ' . substitute(@*,"\n"," ","g") | @a

or if you do not need multiline visual selection

command -range TmuxSession let @a='!tmux.session ' . @* | @a

The @* register stores current selection. So you can join selected text to any other register with your custom command (a in this example, note that you will lost this register text) and then execute it.

The -range is only to avoid an error if you want to execute this command with range marks, i.e. '<,'>TmuxSession.

@* is current selection for linux, on windows there could be different naming convention.

EDIT: easier and not overwritting any register

command -range TmuxSession execute "!tmux.session " . @*

you can also adapt this one liner

command -range TmuxSession execute "!tmux.session " . @*

or if you do need multiline visual selection change @* to substitute(@*,"\n"," ","g")

The @* register stores current selection (for linux, on windows there could be different naming convention).

The -range is only to avoid an error if you want to execute this command with range marks, i.e. '<,'>TmuxSession.

deleted 10 characters in body
Source Link
mrajner
  • 213
  • 1
  • 6

you can also adapt this one liner

command -range TmuxSession let @a='!echo tmux.session ' . substitute(@*,"\n"," ","g") | @a

or if you do not need multiline visual selection

command -range TmuxSession let @a='!echo tmux.session ' . @* | @a

The @* register stores current selection. So you can join selected text to any other register with your custom command (a in this example, note that you will lost this register text) and then execute it.

The -range is only to avoid an error if you want to execute this command with range marks, i.e. '<,'>TmuxSession.

@* is current selection for linux, on windows there could be different naming convention.

EDIT: easier and not overwritting any register

command -range TmuxSession execute "!tmux.session " . @*

you can also adapt this one liner

command -range TmuxSession let @a='!echo tmux.session ' . substitute(@*,"\n"," ","g") | @a

or if you do not need multiline visual selection

command -range TmuxSession let @a='!echo tmux.session ' . @* | @a

The @* register stores current selection. So you can join selected text to any other register with your custom command (a in this example, note that you will lost this register text) and then execute it.

The -range is only to avoid an error if you want to execute this command with range marks, i.e. '<,'>TmuxSession.

@* is current selection for linux, on windows there could be different naming convention.

you can also adapt this one liner

command -range TmuxSession let @a='!tmux.session ' . substitute(@*,"\n"," ","g") | @a

or if you do not need multiline visual selection

command -range TmuxSession let @a='!tmux.session ' . @* | @a

The @* register stores current selection. So you can join selected text to any other register with your custom command (a in this example, note that you will lost this register text) and then execute it.

The -range is only to avoid an error if you want to execute this command with range marks, i.e. '<,'>TmuxSession.

@* is current selection for linux, on windows there could be different naming convention.

EDIT: easier and not overwritting any register

command -range TmuxSession execute "!tmux.session " . @*
Source Link
mrajner
  • 213
  • 1
  • 6

you can also adapt this one liner

command -range TmuxSession let @a='!echo tmux.session ' . substitute(@*,"\n"," ","g") | @a

or if you do not need multiline visual selection

command -range TmuxSession let @a='!echo tmux.session ' . @* | @a

The @* register stores current selection. So you can join selected text to any other register with your custom command (a in this example, note that you will lost this register text) and then execute it.

The -range is only to avoid an error if you want to execute this command with range marks, i.e. '<,'>TmuxSession.

@* is current selection for linux, on windows there could be different naming convention.