Hi

My first commit would be a simple addition to vi-copy mode. Allow
selecting the whole line with 'V'. This is how Vim selects the current
line, and currently in tmux there's no default mapping for this option
at all. Also this select-line option is kind of 'hidden', since it's
not documented in man page and not mapped in 'list-keys -t vi-copy'.
This commit makes the option more visible.

In addition, I would also like to make the following changes:
'v' begins selection mode instead of 'space' (identical to Vim)
'C-v' toggles rectangular selection instead of 'v' (C-v starts block
selection in Vim)
'y' copies the selection instead of Enter (identical to Vim)
What would you think about such changes that alter the 'legacy' behaviour?

Best Regards,
Juho Pohjala


>From f7c74f1e9098c59f4740a2a7737db79527b5c887 Mon Sep 17 00:00:00 2001
From: Juho Pohjala <juho.pohj...@gmail.com>
Date: Sat, 21 Jun 2014 02:02:13 +0300
Subject: [PATCH] vi-copy: select line with V

Line selection works now similarly as in Vim.
---
 mode-key.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/mode-key.c b/mode-key.c
index 8bb83cb..0857c29 100644
--- a/mode-key.c
+++ b/mode-key.c
@@ -288,6 +288,7 @@ const struct mode_key_entry mode_key_vi_copy[] = {
        { 'M',                      0, MODEKEYCOPY_MIDDLELINE },
        { 'N',                      0, MODEKEYCOPY_SEARCHREVERSE },
        { 'T',                      0, MODEKEYCOPY_JUMPTOBACK },
+       { 'V',                      0, MODEKEYCOPY_SELECTLINE },
        { 'W',                      0, MODEKEYCOPY_NEXTSPACE },
        { '\002' /* C-b */,         0, MODEKEYCOPY_PREVIOUSPAGE },
        { '\003' /* C-c */,         0, MODEKEYCOPY_CANCEL },
--
1.7.10.4

------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users

Reply via email to