我在vimrc裏有這個功能裏面可以跳轉至該行的第一個非空字符:跳轉到第一個非空字符在vim TMUX
function! SmartHome()
let s:col = col(".")
normal!^
if s:col == col(".")
normal! 0
endif
endfunction
這個效果很好TMUX會話之外。 但是在一個tmux會話中,它只會跳到線上的第一個字符 - 這是錯誤的!
我制訂這個功能是這樣的:
" smart home function
nnoremap <silent> <Home> :call SmartHome()<CR>
inoremap <silent> <Home> <C-O>:call SmartHome()<CR>
我該如何解決這個問題?
該功能的要點是什麼?你不能只用'^'嗎? – romainl