-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTODO.otl
133 lines (114 loc) · 5.9 KB
/
TODO.otl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
2015-06-04 [X] Autocopying on focus lost/gain
2015-06-08 [X] Vitality <F24>/<F25>
:> Too rigid, can't adapt for all cases. Must rewrite completely.
https://github.com/sjl/vitality.vim/blob/master/plugin/vitality.vim
>[_] find why mapping in cnoremap such a pain
[_] I'm really don't understand why he does that in autoload/tmux_...
:= seems like it was autosaving/loading buffers on focus events
https://github.com/tmux-plugins/vim-tmux-focus-events
[_] https://github.com/jszakmeister/vim-togglecursor
REF
all control sequences
http://invisible-island.net/xterm/ctlseqs/ctlseqs.html
http://en.wikipedia.org/wiki/ANSI_escape_code#CSI_codes
Xterm special codes:
http://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Mouse-Tracking
Vim codes
http://vimdoc.sourceforge.net/htmldoc/term.html#t_RV
Terminal-specific
http://www.tecmint.com/linux-terminal-emulators/
http://www.reddit.com/r/vim/comments/2of45a/terminal_vim_changing_cursor_shape_on_linux/
: http://vim.wikia.com/wiki/Configuring_the_cursor
: http://stackoverflow.com/questions/15217354/how-to-make-cursor-change-in-different-modes-in-vim
TESTCASE
Check for all modes [nxsoicl]
Don't change current/next state [text, selection, operation]
Allowed side-effects -- like :update! on FocusLost
Check on Vim Enter/Leave
Enabling/disabling events subscription
First/last focus events
: Test that edited buffers NOT auto-saved on exit! Need prompt!
DEBUG
Intercept all input in file
: sub on_tt_write { my ($self, $octets) = @_;
: system("bash -c 'printf \"$octets\n\" >> /home/amerlyq/vlog'");
See inputted symbols
tail -f vlog | stdbuf -oL cut -d ' ' -f1 | xxd -c 1
TERMS
URxvt (perl)
http://artisan.karma-lab.net/creer-plugin-urxvt-sauvegarder-vim-automatiquement
: <Change sources to implement>: VIM launch will enable notification of mouse
: events to the terminal (set mouse = ...). When it will stop, it will
: turn off this notification
> But how to do it less harmful?
: So even bash will not show those sequences and interpret them instead?
: Maybe, zsh has built-in ability for focus lost? And I will no need to use urxvt?
: Think about how to disable those commands (or make them not harmful) if plugin is absent
Integrate
: For example a common problem when we're working in the console is to copy text
: on a remote console (ssh vim) and edit the content locally. By this approach
: is feasible by defining a sequence OSC "clipboard" qu'URxvt recover to
: transfer the contents into the CLIPBOARD selection of the local X11 server.
: Something like:
: echo -en "\033]777;CLIPBOARD;ON\077Ceci est mon texte à copier\033]777;CLIPBOARD;OFF\077"
: Besides, the idea is already a little set up in a little-known plugin urxvt, clipboard-osc.
>> Seems like, I can't integrate focus events for urxvt with tmux.
Case 1: intercept standard '\033[?1004l' command for focus enable/disable
Case 2: change focus enable/disable sequences which tmux sends to urxvt
: No results: urxvt perl hook "CSI" sequence
GENERAL
2015-06-04 [X] Check if that codes are in spec now :> Yes (xterm, iTerm2)
: FocusIn/FocusOut control sequences, which uses CSI O and CSI I
https://github.com/fish-shell/fish-shell/issues/1917
| Maybe, create new button in my xkbmap and use it somehow with escape sequences?
BUG
2015-06-07 [X] BUG: Focus not triggered -- FocusIn works not always?
:= Seems like FocusIn for next vim triggered before FocusOut for previous.
: So next vim always copies previous content of "+ register, instead of new.
:> Resolved, adding delay to 'urxvt/ext/focus-term'
2015-06-07 [X] two vims on split screen -- copying works only in one direction
2015-06-07 [X] two vims on different workspaces -- works FocusOut->+, but not FoucIn for another
[_] BUG: returning into vim drops visual selection -- so 'gv' after vnoremap is not enough?
2015-06-08 [X] BUG: cursor don't change form in insert.
:> urxvt don't have 'vbar' cursor
[_] BUG: on <C-y> with specific reg content, may be error msgs produced.
: So, for FocusOut/In use function version w/o printing
[_] BUG: cursor not changing shape inside tmux
[_] BUG: can't start vim, if '*' contains big (>12K) json file content
: How to mitigate such?
[_] BUG: when exiting vim, text is not copied in '+'. VimLeavePre don't work?
CHECK
[_] Copying through // 2015-06-09
[_] ssh
[_] tmux
: WARNING: when opening vim in tmux through ssh -- check dst terminal,
: and probably disable my plugin
[_] ssh+tmux
[_] tmux+ssh
[_] Focus codes for another terminal emulators -- see their specs
: check default codes for urxvt too
TODO
[_] Tmux :> must additionally send it's own events when moving through windows/pans.
[_] SEE tmux already integrated focus feature: focus-events [on|off]
: http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man1/tmux.1?query=tmux&sec=1
[_] FIXME some my functions copies directly into '+', then on focus toggle
: their values will be replaced by current @". Need remake my functions
: or think about some mechanics to prevent such behaviour?
: Maybe copying into '*'?
[_] ADD travis-ci
(kana) http://whileimautomaton.net/
WARNING when opening new terminal ($mod+u) vim is not opened yet, so buffer
will not be copied in @"! You must keep yank shortcuts for such cases.
[_] TODO: optionaly copy buffers on VimEnter/VimLeavePre also.
[_] FIX: don't copy in @p if it's equal to @" (then several focusing
events will not replace it with @+)
[_] ADD checking for gvim -- then use guicursor options for color and shape
[_] vim cursor for replace mode -- t_SR
http://andrewscala.com/vimscript/
[_] What will happend, if you disable focusing and accidentaly exit?
TEST
[_] Check :wa! with dirty new buffer in vim w/o file to save
: to implement autosaving on FocusOut
[_] FIXME: erasing changes scenario
copied in clipboard, pressed $mSd+X, clipboard edited, change focus from vim
as result my edits will be replaced with current @" content