A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/neovim/neovim/commit/8a4e26c6fe7530a0e24268cd373f0d4e53fe81e1 below:

add Recording autocmds · neovim/neovim@8a4e26c · GitHub

File tree Expand file treeCollapse file tree 13 files changed

+132

-22

lines changed

Filter options

Expand file treeCollapse file tree 13 files changed

+132

-22

lines changed Original file line number Diff line number Diff line change

@@ -828,6 +828,14 @@ RemoteReply When a reply from a Vim that functions as

828 828

SearchWrapped After making a search with |n| or |N| if the

829 829

search wraps around the document back to

830 830

the start/finish respectively.

831 +

*RecordingEnter*

832 +

RecordingEnter When a macro starts to be recorded.

833 +

The pattern is the current file name, and

834 +

|reg_recording()| is the current register that

835 +

is used.

836 +

*RecordinLeave*

837 +

RecordingLeave When the is the end of a macro recording.

838 +

The pattern is the current file name.

831 839

*SessionLoadPost*

832 840

SessionLoadPost After loading the session file created using

833 841

the |:mksession| command.

Original file line number Diff line number Diff line change

@@ -2588,6 +2588,7 @@ readdir({dir} [, {expr}]) List file names in {dir} selected by {expr}

2588 2588

readfile({fname} [, {type} [, {max}]])

2589 2589

List get list of lines from file {fname}

2590 2590

reg_executing() String get the executing register name

2591 +

reg_recorded() String get the last recorded register name

2591 2592

reg_recording() String get the recording register name

2592 2593

reltime([{start} [, {end}]]) List get time value

2593 2594

reltimefloat({time}) Float turn the time value into a Float

@@ -7825,6 +7826,11 @@ reg_executing() *reg_executing()*

7825 7826

Returns an empty string when no register is being executed.

7826 7827

See |@|.

7827 7828 7829 +

reg_recorded() *reg_recorded()*

7830 +

Returns the single letter name of the last recorded register.

7831 +

Returns an empty string string when nothing was recorded yet.

7832 +

See |q|.

7833 + 7828 7834

reg_recording() *reg_recording()*

7829 7835

Returns the single letter name of the register being recorded.

7830 7836

Returns an empty string string when not recording. See |q|.

Original file line number Diff line number Diff line change

@@ -563,8 +563,8 @@ The command CTRL-\ CTRL-G or <C-\><C-G> can be used to go to Insert mode when

563 563

make sure Vim is in the mode indicated by 'insertmode', without knowing in

564 564

what mode Vim currently is.

565 565 566 -

*gQ* *Q* *mode-Ex* *Ex-mode* *Ex* *EX* *E501*

567 -

Q or gQ Switch to Ex mode. This is like typing ":" commands

566 +

*gQ* *mode-Ex* *Ex-mode* *Ex* *EX* *E501*

567 +

gQ Switch to Ex mode. This is like typing ":" commands

568 568

one after another, except:

569 569

- You don't have to keep pressing ":".

570 570

- The screen doesn't get updated after each command.

Original file line number Diff line number Diff line change

@@ -147,6 +147,9 @@ q Stops recording.

147 147

*@@* *E748*

148 148

@@ Repeat the previous @{0-9a-z":*} [count] times.

149 149 150 +

*Q*

151 +

Q Repeat the last recorded register [count] times.

152 + 150 153

*:@*

151 154

:[addr]@{0-9a-z".=*+} Execute the contents of register {0-9a-z".=*+} as an Ex

152 155

command. First set cursor at line [addr] (default is

Original file line number Diff line number Diff line change

@@ -218,6 +218,7 @@ Input/Mappings:

218 218 219 219

Normal commands:

220 220

|gO| shows a filetype-defined "outline" of the current buffer.

221 +

|Q| replays the last recorded macro.

221 222 222 223

Options:

223 224

'cpoptions' flags: |cpo-_|

Original file line number Diff line number Diff line change

@@ -75,6 +75,8 @@ return {

75 75

'QuickFixCmdPost', -- after :make, :grep etc.

76 76

'QuickFixCmdPre', -- before :make, :grep etc.

77 77

'QuitPre', -- before :quit

78 +

'RecordingEnter', -- when starting to record a macro

79 +

'RecordingLeave', -- when stopping to record a macro

78 80

'RemoteReply', -- upon string reception from a remote vim

79 81

'SearchWrapped', -- after the search wrapped around

80 82

'SessionLoadPost', -- after loading a session file

@@ -131,6 +133,8 @@ return {

131 133

BufModifiedSet=true,

132 134

DiagnosticChanged=true,

133 135

DirChanged=true,

136 +

RecordingEnter=true,

137 +

RecordingLeave=true,

134 138

Signal=true,

135 139

TabClosed=true,

136 140

TabNew=true,

Original file line number Diff line number Diff line change

@@ -277,6 +277,7 @@ return {

277 277

readfile={args={1, 3}, base=1},

278 278

reg_executing={},

279 279

reg_recording={},

280 +

reg_recorded={},

280 281

reltime={args={0, 2}, base=1},

281 282

reltimefloat={args=1, base=1},

282 283

reltimestr={args=1, base=1},

Original file line number Diff line number Diff line change

@@ -7398,6 +7398,11 @@ static void f_reg_recording(typval_T *argvars, typval_T *rettv, FunPtr fptr)

7398 7398

return_register(reg_recording, rettv);

7399 7399

}

7400 7400 7401 +

static void f_reg_recorded(typval_T *argvars, typval_T *rettv, FunPtr fptr)

7402 +

{

7403 +

return_register(reg_recorded, rettv);

7404 +

}

7405 + 7401 7406

/// list2proftime - convert a List to proftime_T

7402 7407

///

7403 7408

/// @param arg The input list, must be of type VAR_LIST and have

Original file line number Diff line number Diff line change

@@ -632,6 +632,7 @@ EXTERN bool ex_no_reprint INIT(=false); // No need to print after z or p.

632 632 633 633

EXTERN int reg_recording INIT(= 0); // register for recording or zero

634 634

EXTERN int reg_executing INIT(= 0); // register being executed or zero

635 +

EXTERN int reg_recorded INIT(= 0); // last recorded register or zero

635 636 636 637

EXTERN int no_mapping INIT(= false); // currently no mapping allowed

637 638

EXTERN int no_zero_mapping INIT(= 0); // mapping zero not allowed

Original file line number Diff line number Diff line change

@@ -229,7 +229,7 @@ static const struct nv_cmd {

229 229

{ 'N', nv_next, 0, SEARCH_REV },

230 230

{ 'O', nv_open, 0, 0 },

231 231

{ 'P', nv_put, 0, 0 },

232 -

{ 'Q', nv_exmode, NV_NCW, 0 },

232 +

{ 'Q', nv_regreplay, 0, 0 },

233 233

{ 'R', nv_Replace, 0, false },

234 234

{ 'S', nv_subst, NV_KEEPREG, 0 },

235 235

{ 'T', nv_csearch, NV_NCH_ALW|NV_LANG, BACKWARD },

@@ -4028,15 +4028,18 @@ static void nv_zet(cmdarg_T *cap)

4028 4028

/*

4029 4029

* "Q" command.

4030 4030

*/

4031 -

static void nv_exmode(cmdarg_T *cap)

4031 +

static void nv_regreplay(cmdarg_T *cap)

4032 4032

{

4033 -

/*

4034 -

* Ignore 'Q' in Visual mode, just give a beep.

4035 -

*/

4036 -

if (VIsual_active) {

4037 -

vim_beep(BO_EX);

4038 -

} else if (!checkclearop(cap->oap)) {

4039 -

do_exmode();

4033 +

if (checkclearop(cap->oap)) {

4034 +

return;

4035 +

}

4036 + 4037 +

while (cap->count1-- && !got_int) {

4038 +

if (do_execreg(reg_recorded, false, false, false) == false) {

4039 +

clearopbeep(cap->oap);

4040 +

break;

4041 +

}

4042 +

line_breakcheck();

4040 4043

}

4041 4044

}

4042 4045

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4