Post

Replies

Boosts

Views

Activity

Vim Mode config?
Quick feedback Hey everyone, I'm so glad that vim mode is now supported. As a long term vim user, the bottom key guide is remarkable, I was surprised how well and helpful it is, and bet it will be more helpful to new vim users. Honestly great work Xcode dev!!. Vim mode without config? Any vim user known that the true power of vim comes from the ability to customize it and attach commands to key combination. I'm not sure if this is a priority or not, or is it installed for us in official release, but I'm here to emphasize the need for such capability, as it is a MUST have for any vim user. Example Use case Currently, I use the infamous XVim, and I have the following configuration. It consist of shortcuts the trigger Xcode commands or combine multiple key combination to achieve a custom feature: " Language Server": ---------------------------- " Hover" nmap K :xcmenucmd Show Quick Help for Selected Item<cr> " Code Actions " map gx :xcmenucmd Show Code Actions<cr>i " Create snippet" map <space><cr> :xcmenucmd Create Code Snippet<CR> "" UI Control: --------------------------------- nmap <space>tp :xcmenucmd Canvas<CR> nmap <space>tl :xcmenucmd Show Navigator<CR> nmap <space>tr :xcmenucmd Show Inspector<CR> nmap <space>tj :xccmd toggleDebuggerVisibility<CR> nmap <space>tt :xccmd toggleToolbarShown<CR> " Text Editing": ------------------------------- " Select block" nmap <CR> f{V% " Jump to Next/Previous Function" nmap ]f $/func.*\(.*\).*\{<CR>^ nmap [f ?func.*\(.*\).*\{<CR>^ " Add space Below/Above" nmap ]<space> o<Esc> nmap [<space> O<Esc> " Comment Lines" nmap gcc :xcmenucmd Comment Selection<CR> vmap gc :xcmenucmd Comment Selection<CR> " Muscle Memory": ------------------------------- nnoremap <Space>w :xcmenucmd Format File<CR>:w<cr> inoremap <Esc> <Esc>:xcmenucmd Save<CR> inoremap jk <Esc>:xcmenucmd Save<CR> inoremap <c-a> <Esc>^i inoremap <c-e> <Esc>$a noremap ga : noremap H ^ noremap L $ noremap Y y$ vmap < <gv vmap > >gv nmap > >> nmap < << nmap ,, % Thanks ❤️
1
0
1.8k
Jun ’21