VIM을 일반 텍스트 편집기처럼 사용할 수 있도록 몇 가지 매핑이 있습니다. this answer 대부분의 사람들에게 효과가있는 것으로 나타났습니다.일부 맵핑을 vim에서 사용하려고 시도합니다
아이디어는 표준 모드에서 선택하기 위해 Shift + 화살표 키를 사용하는 것입니다. 대신 커서가 멈추고 아무것도하지 않게됩니다. 또한
나는 정력에서 작업 multi-cursors을 얻으려고하지만 난 내 키 매핑을 사용할 때 나는 여기
E78: Unknown mark
이
key-mappings 내입니다이 오류를 얻을 :
" Buffer switching
map <leader>p :bp<CR> " \p previous buffer
map <leader>n :bn<CR> " \n next buffer
map <leader>d :bd<CR> " \d delete buffer
" Increment numbers
nnoremap <A-a> <C-a>
nnoremap <A-x> <C-x>
map <Leader>c :call vroom#RunTestFile()<CR>
map <Leader>s :call vroom#RunNearestTest()<CR>
map <leader>t :A<CR> " \t to jump to test file
map <leader>r :r<cr> " \t to jump to related file
map <leader>E :Explore .<cr> " \E to open file explorer in root
map <leader>e :Explore<cr> " \e to open file explorer in current dir
"nerd tree mapings
map <C-n> <plug>NERDTreeTabsToggle<CR>
"shit plus arrow for selectio mode
" shift+arrow selection
nmap <S-Up> v<Up>
nmap <S-Down> v<Down>
nmap <S-Left> v<Left>
nmap <S-Right> v<Right>
vmap <S-Up> <Up>
vmap <S-Down> <Down>
vmap <S-Left> <Left>
vmap <S-Right> <Right>
imap <S-Up> <Esc>v<Up>
imap <S-Down> <Esc>v<Down>
imap <S-Left> <Esc>v<Left>
imap <S-Right> <Esc>v<Right>
"copy and pasting
vmap <C-c> y<Esc>i
vmap <C-x> d<Esc>i
map <C-v> pi
imap <C-v> <Esc>pi
imap <C-z> <Esc>ui
"multi-cursor mappings"
let g:multi_cursor_next_key='<leader>d'
let g:multi_cursor_prev_key='<leader>s'
let g:multi_cursor_skip_key='<C-x>'
let g:multi_cursor_quit_key='<Esc>'
" Removing escape
ino jj <esc>
cno jj <c-c>
vno v <esc>
" Remove highlights with leader + enter
nmap <Leader><CR> :nohlsearch<cr>
" Ruby hash syntax conversion
nnoremap <F12> :%s/:\([^ ]*\)\(\s*\)=>/\1:/g<return>
나는 또한 싶습니다에게 덧붙이 기 나는 기본 텍스트 편집을 넘어서서 vim을 처음 보았을 때 새로운 것을 알았 기 때문에 나는 잘못하고, 어떤면을 모르는 등의 일을하고 있음을 의심하지 않는다.
shift+left
을 누르면 D
이 터미널로 출력됩니다.
shift+right
을 누르면, C
이 단말에 출력된다.
당신은 비주얼 모드를 알고 있습니까? 왜 당신이 텍스트를 선택하는 것을 선호하지 않았습니까? 텍스트 모션과 함께이를 사용할 수 있으며 단어, 줄 또는 단락 또는이 중 여러 개를 선택할 수 있습니다! – SibiCoder
터미널에 있습니까? 터미널이 실제로 그 키 코드를보고 인식 할 수 있다는 보장은 없습니다. –
@ Christian Brabandt 나는 그것이 변화를 인식했음을 인식하고, 실제로는 다른 것을하고, 그것이 실제로 무엇을하는지 확신하지 못합니다. 키를 인식하는지 테스트하는 가장 좋은 방법은 무엇입니까? – Thermatix