В vimrc, как я могу связать несколько инструкций в одной команде Leader

маленький намек:

От: [https://bugs.launchpad.net/ubuntu/+source/update-notifier/+bug/300463]

Как описано в http://forum.lxde.org/viewtopic.php?f=8&t=114&p=287 демон демон обновлений не запускается автоматически на других настольных компьютерах, которые его поддерживают, поэтому я не получаю автоматические обновления как указанном в конфигурации, если я вручную не запускаю диспетчер обновлений (который работает хорошо). В:
   /etc/xdg/autostart/update-notifier.desktop
Внутри этого файла есть строка, читаемая следующим образом:
   OnlyShowIn=GNOME;XFCE;
Эта строка должна быть изменена на: NotShowIn = KDE; Или другие неподдерживаемые рабочие столы. Я использую Xubuntu 8.10 и среду рабочего стола LXDE (вот как я узнал)
0
задан 16 April 2017 в 18:40

9 ответов

Vim использует | для соединения команд ex. Из :h cmdline-lines:

:bar :\bar '|' can be used to separate commands, so you can give multiple commands in one line. If you want to use '|' in an argument, precede it with '\'. These commands see the '|' as their argument, and can therefore not be followed by another Vim command:

За этим следует список команд, который не включает :map или его варианты. Итак, вам нужно использовать \|. Далее справка - это заметка о :map, которая приводит к :h cmdline-lines :

map_bar map-bar Since the '|' character is used to separate a map command from the next command, you will have to do something special to include a '|' in {rhs}. There are three methods: use works when example <Bar> '<' is not in 'cpoptions' :map _l :!ls <Bar> more^M \| 'b' is not in 'cpoptions' :map _l :!ls \| more^M ^V| always, in Vim and Vi :map _l :!ls ^V| more^M (here ^V stands for CTRL-V; to get one CTRL-V you have to type it twice; you cannot use the <> notation "<C-V>" here). All three work when you use the default setting for 'cpoptions'.

Итак, если вы не изменили cpoptions:

map <Leader>c :GitGutterToggle <bar> :set invnumber<CR>

Обратите внимание, что вы должны использовать noremap (и более конкретные команды nnoremap, vnoremap и т. д.), чтобы вы не удивлялись вашим сопоставлениям.

0
ответ дан 18 July 2018 в 14:50

Vim использует | для соединения команд ex. Из :h cmdline-lines:

:bar :\bar '|' can be used to separate commands, so you can give multiple commands in one line. If you want to use '|' in an argument, precede it with '\'. These commands see the '|' as their argument, and can therefore not be followed by another Vim command:

За этим следует список команд, который не включает :map или его варианты. Итак, вам нужно использовать \|. Далее справка - это заметка о :map, которая приводит к :h cmdline-lines :

map_bar map-bar Since the '|' character is used to separate a map command from the next command, you will have to do something special to include a '|' in {rhs}. There are three methods: use works when example <Bar> '<' is not in 'cpoptions' :map _l :!ls <Bar> more^M \| 'b' is not in 'cpoptions' :map _l :!ls \| more^M ^V| always, in Vim and Vi :map _l :!ls ^V| more^M (here ^V stands for CTRL-V; to get one CTRL-V you have to type it twice; you cannot use the <> notation "<C-V>" here). All three work when you use the default setting for 'cpoptions'.

Итак, если вы не изменили cpoptions:

map <Leader>c :GitGutterToggle <bar> :set invnumber<CR>

Обратите внимание, что вы должны использовать noremap (и более конкретные команды nnoremap, vnoremap и т. д.), чтобы вы не удивлялись вашим сопоставлениям.

0
ответ дан 24 July 2018 в 20:29

Vim использует | для соединения команд ex. Из :h cmdline-lines:

:bar :\bar '|' can be used to separate commands, so you can give multiple commands in one line. If you want to use '|' in an argument, precede it with '\'. These commands see the '|' as their argument, and can therefore not be followed by another Vim command:

За этим следует список команд, который не включает :map или его варианты. Итак, вам нужно использовать \|. Далее справка - это заметка о :map, которая приводит к :h cmdline-lines :

map_bar map-bar Since the '|' character is used to separate a map command from the next command, you will have to do something special to include a '|' in {rhs}. There are three methods: use works when example <Bar> '<' is not in 'cpoptions' :map _l :!ls <Bar> more^M \| 'b' is not in 'cpoptions' :map _l :!ls \| more^M ^V| always, in Vim and Vi :map _l :!ls ^V| more^M (here ^V stands for CTRL-V; to get one CTRL-V you have to type it twice; you cannot use the <> notation "<C-V>" here). All three work when you use the default setting for 'cpoptions'.

Итак, если вы не изменили cpoptions:

map <Leader>c :GitGutterToggle <bar> :set invnumber<CR>

Обратите внимание, что вы должны использовать noremap (и более конкретные команды nnoremap, vnoremap и т. д.), чтобы вы не удивлялись вашим сопоставлениям.

0
ответ дан 31 July 2018 в 23:31

Vim использует | для соединения команд ex. Из :h cmdline-lines :

                                                        :bar :\bar
'|' can be used to separate commands, so you can give multiple commands in one
line.  If you want to use '|' in an argument, precede it with '\'.

These commands see the '|' as their argument, and can therefore not be
followed by another Vim command:

За этим следует список команд, которые не включают :map или его варианты. Итак, вам нужно использовать \|. Далее справка - это примечание о :map, которое приводит к :h map_bar :

                                                        map_bar map-bar
Since the '|' character is used to separate a map command from the next
command, you will have to do something special to include  a '|' in {rhs}.
There are three methods:
   use       works when                    example      
   <Bar>     '<' is not in 'cpoptions'     :map _l :!ls <Bar> more^M
   \|        'b' is not in 'cpoptions'     :map _l :!ls \| more^M
   ^V|       always, in Vim and Vi         :map _l :!ls ^V| more^M

(here ^V stands for CTRL-V; to get one CTRL-V you have to type it twice; you
cannot use the <> notation "<C-V>" here).

All three work when you use the default setting for 'cpoptions'.

Итак, если вы не изменили cpoptions:

map <Leader>c :GitGutterToggle <bar> :set invnumber<CR>

Обратите внимание, что вы должны использовать noremap (и более конкретные команды nnoremap, vnoremap и т. д.), чтобы вы не удивлялись вашей отображения.

0
ответ дан 2 August 2018 в 18:28

Vim использует | для соединения команд ex. Из :h cmdline-lines :

                                                        :bar :\bar
'|' can be used to separate commands, so you can give multiple commands in one
line.  If you want to use '|' in an argument, precede it with '\'.

These commands see the '|' as their argument, and can therefore not be
followed by another Vim command:

За этим следует список команд, которые не включают :map или его варианты. Итак, вам нужно использовать \|. Далее справка - это примечание о :map, которое приводит к :h map_bar :

                                                        map_bar map-bar
Since the '|' character is used to separate a map command from the next
command, you will have to do something special to include  a '|' in {rhs}.
There are three methods:
   use       works when                    example      
   <Bar>     '<' is not in 'cpoptions'     :map _l :!ls <Bar> more^M
   \|        'b' is not in 'cpoptions'     :map _l :!ls \| more^M
   ^V|       always, in Vim and Vi         :map _l :!ls ^V| more^M

(here ^V stands for CTRL-V; to get one CTRL-V you have to type it twice; you
cannot use the <> notation "<C-V>" here).

All three work when you use the default setting for 'cpoptions'.

Итак, если вы не изменили cpoptions:

map <Leader>c :GitGutterToggle <bar> :set invnumber<CR>

Обратите внимание, что вы должны использовать noremap (и более конкретные команды nnoremap, vnoremap и т. д.), чтобы вы не удивлялись вашей отображения.

0
ответ дан 3 August 2018 в 20:46

Vim использует | для соединения команд ex. Из :h cmdline-lines :

                                                        :bar :\bar
'|' can be used to separate commands, so you can give multiple commands in one
line.  If you want to use '|' in an argument, precede it with '\'.

These commands see the '|' as their argument, and can therefore not be
followed by another Vim command:

За этим следует список команд, которые не включают :map или его варианты. Итак, вам нужно использовать \|. Далее справка - это примечание о :map, которое приводит к :h map_bar :

                                                        map_bar map-bar
Since the '|' character is used to separate a map command from the next
command, you will have to do something special to include  a '|' in {rhs}.
There are three methods:
   use       works when                    example      
   <Bar>     '<' is not in 'cpoptions'     :map _l :!ls <Bar> more^M
   \|        'b' is not in 'cpoptions'     :map _l :!ls \| more^M
   ^V|       always, in Vim and Vi         :map _l :!ls ^V| more^M

(here ^V stands for CTRL-V; to get one CTRL-V you have to type it twice; you
cannot use the <> notation "<C-V>" here).

All three work when you use the default setting for 'cpoptions'.

Итак, если вы не изменили cpoptions:

map <Leader>c :GitGutterToggle <bar> :set invnumber<CR>

Обратите внимание, что вы должны использовать noremap (и более конкретные команды nnoremap, vnoremap и т. д.), чтобы вы не удивлялись вашей отображения.

0
ответ дан 5 August 2018 в 05:27

Vim использует | для соединения команд ex. Из :h cmdline-lines :

                                                        :bar :\bar
'|' can be used to separate commands, so you can give multiple commands in one
line.  If you want to use '|' in an argument, precede it with '\'.

These commands see the '|' as their argument, and can therefore not be
followed by another Vim command:

За этим следует список команд, которые не включают :map или его варианты. Итак, вам нужно использовать \|. Далее справка - это примечание о :map, которое приводит к :h map_bar :

                                                        map_bar map-bar
Since the '|' character is used to separate a map command from the next
command, you will have to do something special to include  a '|' in {rhs}.
There are three methods:
   use       works when                    example      
   <Bar>     '<' is not in 'cpoptions'     :map _l :!ls <Bar> more^M
   \|        'b' is not in 'cpoptions'     :map _l :!ls \| more^M
   ^V|       always, in Vim and Vi         :map _l :!ls ^V| more^M

(here ^V stands for CTRL-V; to get one CTRL-V you have to type it twice; you
cannot use the <> notation "<C-V>" here).

All three work when you use the default setting for 'cpoptions'.

Итак, если вы не изменили cpoptions:

map <Leader>c :GitGutterToggle <bar> :set invnumber<CR>

Обратите внимание, что вы должны использовать noremap (и более конкретные команды nnoremap, vnoremap и т. д.), чтобы вы не удивлялись вашей отображения.

0
ответ дан 6 August 2018 в 22:34

Vim использует | для соединения команд ex. Из :h cmdline-lines :

                                                        :bar :\bar
'|' can be used to separate commands, so you can give multiple commands in one
line.  If you want to use '|' in an argument, precede it with '\'.

These commands see the '|' as their argument, and can therefore not be
followed by another Vim command:

За этим следует список команд, которые не включают :map или его варианты. Итак, вам нужно использовать \|. Далее справка - это примечание о :map, которое приводит к :h map_bar :

                                                        map_bar map-bar
Since the '|' character is used to separate a map command from the next
command, you will have to do something special to include  a '|' in {rhs}.
There are three methods:
   use       works when                    example      
   <Bar>     '<' is not in 'cpoptions'     :map _l :!ls <Bar> more^M
   \|        'b' is not in 'cpoptions'     :map _l :!ls \| more^M
   ^V|       always, in Vim and Vi         :map _l :!ls ^V| more^M

(here ^V stands for CTRL-V; to get one CTRL-V you have to type it twice; you
cannot use the <> notation "<C-V>" here).

All three work when you use the default setting for 'cpoptions'.

Итак, если вы не изменили cpoptions:

map <Leader>c :GitGutterToggle <bar> :set invnumber<CR>

Обратите внимание, что вы должны использовать noremap (и более конкретные команды nnoremap, vnoremap и т. д.), чтобы вы не удивлялись вашей отображения.

0
ответ дан 9 August 2018 в 03:00

Vim использует | для соединения команд ex. Из :h cmdline-lines :

                                                        :bar :\bar
'|' can be used to separate commands, so you can give multiple commands in one
line.  If you want to use '|' in an argument, precede it with '\'.

These commands see the '|' as their argument, and can therefore not be
followed by another Vim command:

За этим следует список команд, которые не включают :map или его варианты. Итак, вам нужно использовать \|. Далее справка - это примечание о :map, которое приводит к :h map_bar :

                                                        map_bar map-bar
Since the '|' character is used to separate a map command from the next
command, you will have to do something special to include  a '|' in {rhs}.
There are three methods:
   use       works when                    example      
   <Bar>     '<' is not in 'cpoptions'     :map _l :!ls <Bar> more^M
   \|        'b' is not in 'cpoptions'     :map _l :!ls \| more^M
   ^V|       always, in Vim and Vi         :map _l :!ls ^V| more^M

(here ^V stands for CTRL-V; to get one CTRL-V you have to type it twice; you
cannot use the <> notation "<C-V>" here).

All three work when you use the default setting for 'cpoptions'.

Итак, если вы не изменили cpoptions:

map <Leader>c :GitGutterToggle <bar> :set invnumber<CR>

Обратите внимание, что вы должны использовать noremap (и более конкретные команды nnoremap, vnoremap и т. д.), чтобы вы не удивлялись вашей отображения.

0
ответ дан 14 August 2018 в 21:17

Другие вопросы по тегам:

Похожие вопросы: