进一步阅读Vim,:help I am using local and remote tmux sessions.To send commands to the local tmux I use Ctrl-a, and to the remote Ctrl-q.I have tried to disable the number increment that normally executes with Ctrl-a in vim, but it now triggers with Ctrl-q and i cannot find a way to disable it.BTW this happens only when a particular tmux window does not nest a remote one.Also, I think there still might be a combination of shortcuts in a remote tmux session that also triggers the increment.So is there a way to completely disable the function?An ideal solution would be to override it with a function that does nothing.That's a very sneaky command, and I had some really terrible debugging experiences in the past because of this!My tmux.conf:..unbind C-bset -g prefix C-abind-key -n C-q send-prefix...Then in vim I try to disable both Ctrl-a and Ctrl-q with no-ops.This is my vimrc:...map <Ctrl-A> <Nop>map <Ctrl-Q> <Nop>...I have also tried putting entries for Ctrl-a and Ctrl-q but still Ctrl-q does the increment.I think the problem is because tmux receives Ctrl-q and then sends it as prefix which is somehow not caught by my extra mappings.Cheers,Paschalis 解决方案 Why it doesn't workCtrl is not a vim-recognized <> notation to represent a keyboard's key.RecommendationTo disable - triggering default vim auto-increment on a number:In your ~/.vimrc, as @Marth said, use <C-a>:map <C-a> <Nop>Save :w:so ~/.vimrc for it to take effect.WarrantyTested to work in Vim 7.4You don't need to disable Ctrl-q in VimExplanationDon't need to disable Ctrl-q within Vim, since your Tmux is never sending Ctrl-q,Your posted tmux.conf is sending prefix, which you define as Ctrl-a, so Vim is only receiving Ctrl-aThus you successfully disable the auto-increment when you map - to the do-nothing instruction <Nop>Further readingVim, :help <> 这篇关于禁用映射到 Ctrl-a 的良好 VIM 的数字增量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!