# IntelliTab IntelliTab is a small neovim plugin that fixes an annoying gripe I've had with vim's tab completion implementation for ages: pressing tab on a blank line only indents by a single space, instead of automatically indenting to your specified location. With IntelliTab, pressing Tab works like it does on editors such as VSCode, by indenting to the same place `smartindent` would have indented it to if it were a new line. ## Installation Install using your favourite package manager: ```vim Plug 'pta2002/intellitab.nvim' ``` Now, just rebind ``: ```vim inoremap lua require("intellitab").indent() ``` That's it! ### If you are using CoC CoC wants to have its own binding for Tab, which means it won't be compatible with intellitab by default. A solution to this is to bind Tab to this instead: ```vim inoremap \ pumvisible() ? "\" : \ check_back_space() ? lua require("intellitab").indent() : \ coc#refresh() inoremap pumvisible() ? "\" : "\" ``` ### If you are using nvim-cmp On the `nvim-cmp` setup, add this binding for tab: ```lua [''] = function(fallback) if cmp.visible() then cmp.select_next_item() -- or whatever else you want nvim-cmp to do when you press tab else require("intellitab").indent() end end ```