在vi中,搜索和替換,你如何轉義'/'(正斜槓)以便它是正確的。說一條道路。/in vi搜索並替換?
,如:/用戶/湯姆/文件/ PDF文件/
:%s//Users/tom/documents/pdfs//<new text>/g --FAILS (obviously)
:%s/\/Users/tom/documents/pdfs\//<new text>/g -- FAILS with a trailing error
:%s/'/Users/tom/documents/pdfs/'/<new text>/g -- FAILS with a trailing error
我缺少什麼?
可能的重複[在VIM find/search中如何避免反斜槓和正斜槓?](http://stackoverflow.com/questions/2465156/how-does-one-escape-backslashes-and-forward-slashes -in-vim-find-search) – Pureferret 2016-10-03 10:30:38