A more feature rich vimrc example, and a demo gif
See original GitHub issue
Vimrc for demo:
Make sure you do understand what it is doing before copying config. Comment if you have any question
execute 'source ' . $WORKSPACE_DIR . '/plug.vim'
call plug#begin($WORKSPACE_DIR)
Plug 'ncm2/ncm2'
Plug 'roxma/nvim-yarp'
autocmd BufEnter * call ncm2#enable_for_buffer()
set completeopt=noinsert,menuone,noselect
set shortmess+=c
inoremap <c-c> <ESC>
inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
Plug 'ncm2/ncm2-match-highlight'
Plug 'ncm2/ncm2-ultisnips'
Plug 'SirVer/ultisnips'
Plug 'honza/vim-snippets'
inoremap <silent> <expr> <CR> ((pumvisible() && empty(v:completed_item)) ? "\<c-y>\<cr>" : (!empty(v:completed_item) ? ncm2_ultisnips#expand_or("", 'n') : "\<CR>" ))
" c-j c-k for moving in snippet
imap <expr> <c-u> ncm2_ultisnips#expand_or("\<Plug>(ultisnips_expand)", 'm')
smap <c-u> <Plug>(ultisnips_expand)
let g:UltiSnipsExpandTrigger = "<Plug>(ultisnips_expand)"
let g:UltiSnipsJumpForwardTrigger = "<c-j>"
let g:UltiSnipsJumpBackwardTrigger = "<c-k>"
let g:UltiSnipsRemoveSelectModeMappings = 0
Plug 'ncm2/ncm2-html-subscope'
Plug 'ncm2/ncm2-markdown-subscope'
Plug 'ncm2/ncm2-bufword'
Plug 'ncm2/ncm2-jedi'
Plug 'ncm2/ncm2-pyclang'
Plug 'ncm2/ncm2-tern'
Plug 'ncm2/ncm2-cssomni'
Plug 'autozimu/LanguageClient-neovim', {
\ 'branch': 'next',
\ 'do': 'bash install.sh',
\ }
let g:LanguageClient_serverCommands = {
\ 'vue': ['vls'],
\ 'rust': ['rls'],
\ }
" read
" https://github.com/autozimu/LanguageClient-neovim/pull/514#issuecomment-404463033
" for contents of settings.json for vue-language-server
let g:LanguageClient_settingsPath = $WORKSPACE_DIR . '/.vim/settings.json'
let g:LanguageClient_completionPreferTextEdit = 1
autocmd BufNewFile,BufRead *.vue set filetype=vue
autocmd filetype vue LanguageClientStart
" the suddennly popup of diagnostics sign is kind of annoying
let g:LanguageClient_diagnosticsSignsMax = 0
" " for debugging LanguageClient-neovim
" set noshowmode
" inoremap <silent> <c-q> <esc>:<c-u>q!<cr>
" let g:LanguageClient_loggingFile = '/tmp/lc.log'
" let g:LanguageClient_loggingLevel = 'DEBUG'
" markdown syntax highlight, theme
Plug 'morhetz/gruvbox'
Plug 'plasticboy/vim-markdown', {'for': 'markdown'}
call plug#end()
set background=dark
colorscheme gruvbox
set number
set relativenumber
Issue Analytics
- State:
- Created 5 years ago
- Reactions:9
- Comments:17 (6 by maintainers)
Top Results From Across the Web
Tweets mit Antworten von Vim Links (@VimLinks) / Twitter
A fascinating Neovim tool that lets you search-and-replace by AST: https://github.com/cshuaimin/ssr.nvim/…
Read more >5 Killer Vim Features for Your Data Science Daily Routine
In this article, I will introduce a few vim features that really help me to remove frictions in my data science workflows.
Read more >Vimrc Configuration Guide - How to Customize Your Vim ...
In this article I will show you a few ways you can customize your .vimrc file. I will go over: Basic Settings; Plugins;...
Read more >awesome-vscode | A curated list of delightful VS Code ...
Show language diagnostics inline (errors/warnings/…). error lens demo gif. Toggle. Toggle any VS Code setting by your favorite keybindings. Example of toggling ...
Read more >Vim C++ - There Is Such a Thing! - Incredibuild
For example, there are a variety of plugins for C++ that offer support for syntax checking, code completion, and debugging. Hence, Vim C++!....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@terkelg
I don’t remember why I chose this mapping. Currently I’m using
inoremap <silent> <expr> <CR> ncm2_ultisnips#expand_or("\<CR>", 'n')in my vimrc.@ukrdev you should be familiar with one of ultisnips, neosnippet or snipmate before using the snippet feature for parameter expansion.