感谢这些stack overflow帖子,我知道如何在搜索后生成一个以行为中心的nmap。这很好,但我正在使用管道分隔的值,其中单个行可能有1000列长,我希望将该行居中,并将匹配列放在屏幕的左侧。有人知道怎么做吗?
示例:
/University of California<CR>n应该放
University of California, San Francisco, Calif. (...) 在屏幕的左边,当涉及到这一行时:
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.发布于 2011-06-08 14:41:27
nnoremap n nzzzs和nnoremap N Nzzzs可能会完成你想要的。如果vim隐藏了搜索短语的第一个字母,您可能需要在其中的zh中向左滚动一列。
zz将光标放置在屏幕中心,verticallyzs将光标放置在屏幕的最左边有关详细信息,请参阅:help scroll-horizontal。
https://stackoverflow.com/questions/6280309
复制相似问题