خرید بک لینک

In Vim, when using the omnifunc for completion, it's possible to browse through the completion results with <Down> and <Up> without the "selected" result actually being inserted before the cursor.

It is also possible to cycle through the completion results with <C-n> and <C-p>, which will insert the completion results before the cursor.

I'd like to configure Vim so that using <C-n> has the same effect as <Down> in the situation where I have invoked the ins-completion-menu with <C-x><C-o>. I would then use <C-y> to "accept" and insert the selected result. I have read the tips on this page: http://vim.wikia.com/wiki/Make_Vim_completion_popup_menu_work_just_like_in_an_IDE especially:

inoremap <expr> <C-n> pumvisible() ? '<C-n>' : '<C-n><C-r>=pumvisible() ? "<lt>Down>" : ""<CR>'

inoremap <expr> <M-,> pumvisible() ? '<C-n>' : '<C-x><C-o><C-n><C-p><C-r>=pumvisible() ? "<lt>Down>" : ""<CR>'

I have put these mappings in my vimrc, and they work but only if I invoke the ins-copmletion-menu with <C-n>, not when I invoke it with the omnicompletion trigger <C-x><C-o>.

برچسب: نویسنده: استخدام کار تاريخ: پنجشنبه 26 فروردين 1395 ساعت: 17:41

صفحه بندی