1

In vimwiki, <C-x><C-o> provides available tags in autocomplete dropdown. I am attempting to map that key mapping to something easier like (ctrl+alt+space) and only when I am in a markdown file. How can I accomplish such?

Things I have tried but didn't work:

nnoremap <buffer> <C-M-space> <C-x><C-o>
inoremap <buffer> <C-M-space> <C-x><C-o>

nnoremap <C-M-space> <C-x><C-o>
inoremap <C-M-space> <C-x><C-o>

autocmd! FileType markdown nnoremap <buffer> <C-M-space> <C-x><C-o>
autocmd! FileType markdown inoremap <buffer> <C-M-space> <C-x><C-o>

autocmd! FileType md nnoremap <buffer> <C-M-space> <C-x><C-o>
autocmd! FileType md inoremap <buffer> <C-M-space> <C-x><C-o>

map <buffer> <C-M-space> <C-x><C-o>
1
  • 1
    You need to use the autocmd FileType markdown you have, that one is fine. The problem is probably that mapping Ctrl+Alt+Space is hard/impossible in your terminal. On my terminal anyway that doesn't work. I'm not sure if there's a good solution for this. Jun 26 at 10:29

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.