Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/vim/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
vim在搜索或跳转后自动跳转到列_Vim - Fatal编程技术网

vim在搜索或跳转后自动跳转到列

vim在搜索或跳转后自动跳转到列,vim,Vim,多亏了这些帖子,我知道了如何在搜索后使行居中的nmap。这很好,但我正在使用管道分隔值,其中一行可能有1000列长,我希望将行居中,并将匹配的列放在屏幕的左侧。有人知道怎么做吗 例如: /University of California<CR>n 当涉及到这一行时,在屏幕的左侧: CASE, Ed|N00025882|http://bioguide.congress.gov/scripts/biodisplay.pl?index=C001055|a Representative f

多亏了这些帖子,我知道了如何在搜索后使行居中的nmap。这很好,但我正在使用管道分隔值,其中一行可能有1000列长,我希望将行居中,并将匹配的列放在屏幕的左侧。有人知道怎么做吗

例如:

/University of California<CR>n
当涉及到这一行时,在屏幕的左侧:

CASE, Ed|N00025882|http://bioguide.congress.gov/scripts/biodisplay.pl?index=C001055|a Representative from Hawaii; born in Hilo, Territory of Hawaii, September 27, 1952; graduated from Hawaii Preparatory High School, Kamuela, Hawaii, 1970; B.A., Williams College, Williamstown, Mass., 1975; J.D., University of California, San Francisco, Calif., 1981; lawyer, private practice; staff member for United States Representative Spark Matsunaga, 1975-1977; staff member for United States Senator Spark Matsunaga, 1977-1978; member of the Hawaii state house of representatives, 1994-2002; unsuccessful candidate for nomination for Governor of Hawaii in 2002; elected as a Democrat to the One Hundred and Seventh Congress, by special election, to fill the vacancy caused by the death of United States Representative Patsy Mink, (November 30, 2002-January 3, 2003); elected as a Democrat to the One Hundred Eighth Congress, by special election, to fill the vacancy caused by the death of United States Representative Patsy Mink, and reelected to the succeeding Congress (January 4, 2003-January 3, 2007); not a candidate for reelection, but was an unsuccessful candidate to the United States Senate in 2006; unsuccessful candidate for United States House of Representatives in 2010.

nnoremap n nzzs
nnoremap n nzzs
可能会满足您的要求。如果vim正在隐藏搜索短语的第一个字母,您可能需要在其中添加一个
zh
,以向左滚动一列

  • zz
    将光标垂直放置在屏幕中央
  • zs
    将光标放在屏幕最左侧
有关更多信息,请参阅
:帮助水平滚动

CASE, Ed|N00025882|http://bioguide.congress.gov/scripts/biodisplay.pl?index=C001055|a Representative from Hawaii; born in Hilo, Territory of Hawaii, September 27, 1952; graduated from Hawaii Preparatory High School, Kamuela, Hawaii, 1970; B.A., Williams College, Williamstown, Mass., 1975; J.D., University of California, San Francisco, Calif., 1981; lawyer, private practice; staff member for United States Representative Spark Matsunaga, 1975-1977; staff member for United States Senator Spark Matsunaga, 1977-1978; member of the Hawaii state house of representatives, 1994-2002; unsuccessful candidate for nomination for Governor of Hawaii in 2002; elected as a Democrat to the One Hundred and Seventh Congress, by special election, to fill the vacancy caused by the death of United States Representative Patsy Mink, (November 30, 2002-January 3, 2003); elected as a Democrat to the One Hundred Eighth Congress, by special election, to fill the vacancy caused by the death of United States Representative Patsy Mink, and reelected to the succeeding Congress (January 4, 2003-January 3, 2007); not a candidate for reelection, but was an unsuccessful candidate to the United States Senate in 2006; unsuccessful candidate for United States House of Representatives in 2010.