vim-plugin

YCM does not find my headers?

半城伤御伤魂 提交于 2021-02-07 05:38:25
问题 I have the following folder structure: . ├── include │ └── ctset │ ├── hashtable.h │ └── set.h └── src └── hashtable └── hashtable.c And in hashtable.c the include #include "ctset/hashtable.h" , but YCM keeps telling me that it doesn't know the types I defined in the header and use in the source. My .ycm_extra_conf.py is almost the default one with some adjustments: # This file is NOT licensed under the GPLv3, which is the license for the rest # of YouCompleteMe. # # Here's the license text

YCM does not find my headers?

南楼画角 提交于 2021-02-07 05:38:06
问题 I have the following folder structure: . ├── include │ └── ctset │ ├── hashtable.h │ └── set.h └── src └── hashtable └── hashtable.c And in hashtable.c the include #include "ctset/hashtable.h" , but YCM keeps telling me that it doesn't know the types I defined in the header and use in the source. My .ycm_extra_conf.py is almost the default one with some adjustments: # This file is NOT licensed under the GPLv3, which is the license for the rest # of YouCompleteMe. # # Here's the license text

How can I cause the QuickFix window to close after I select an item in it?

有些话、适合烂在心里 提交于 2020-05-09 04:36:12
问题 I got the wonderful bookmarks.vim plugin to my vim. I especially like the named bookmarks and using the QuickFix window to list them. In the code to show the bookmark list I'd like to add something that causes the QuickFix window to close after I select a choice. How do I do that? " Open all bookmarks in the quickfix window command! CopenBookmarks call s:CopenBookmarks() function! s:CopenBookmarks() let choices = [] for [name, place] in items(g:BOOKMARKS) let [filename, cursor] = place call

Vim script to open file at certain line number

纵然是瞬间 提交于 2020-03-04 06:24:52
问题 I am currently using emacs where someone had already setup the configurations, but because I like vim better, I wanted to do the same in vim. In emacs when a user enters a shortcut, emacs opens a new split and shows the data related to that function in the new split, which is under the cursor in the former file. All subsequent info is shown in the same split window. I wanted to do the same in vim. When I take the cursor over a function name in a file, it should pull up the associated

Is it possible to remap an Ex command in Vim (remap :Ack to :ack)?

爷,独闯天下 提交于 2020-01-24 05:24:26
问题 I use the Vim plugin ack.vim, but I don't understand why the command is :Ack with a capital "A" (a little annoying to hold shift ). Is it possible to remap this to :ack ? 回答1: Built-in commands start with a lowercase character and custom commands start with an uppercase character. Those are the rules. Vim simply won't let you define a custom command starting with a lowercase. If you don't like it, nothing prevents you from creating a normal mode mapping: nnoremap <leader>a :Ack<Space> which

Please explain Vim's configuration directories hierarchy

╄→尐↘猪︶ㄣ 提交于 2020-01-22 04:51:26
问题 I am trying to update my Vim configuration scripts. There are a number of sub-directories in my ~/.vim directory and I'm not sure the specifics of what they do, nor why there are some that seem to be redundant. Here is what my ~/.vim directory tree looks like |-after |---ftplugin |---syntax |-autoload |-compiler |-doc |-ftplugin |---latex-suite |-----dictionaries |-----macros |-----packages |-----templates |---python |-indent |-plugin |-spell |-syntax Now for the specific questions. What goes

<Plug> function failing, inserting as literal “<t_ý>S”

左心房为你撑大大i 提交于 2020-01-17 05:47:09
问题 To autocomplete by pressing enter, I have the following map setup to work with neocomplete.vim: inoremap <silent> <CR> <C-r>=<SID>my_cr_function()<CR> function! s:my_cr_function() return pumvisible() ? "\<c-y>" : "\<CR>" endfunction This works fine. To explain, pumvisible() returns true when neocomplete's PopUpMenu is showing. <c-y> chooses the selected word, inserting it after the insert mode cursor, and closes the neocomplete popup. I want to extend this mapping so that, when the

Vim plugin to generate Javascript Documentation comments

蓝咒 提交于 2020-01-12 05:50:12
问题 Is there a plugin for vim, somewhat like Jsbeautify, which automatically generates JavaDoc like comments in the script files. For example it will take this function(a , b , c){ } and return /** * Description. * * @param a Description. * @param b Description. * @param c Description. */ function(a , b , c){ } 回答1: Here's a little something to get you started - tweak as required!-) " generate doc comment template map <LocalLeader>/ :call GenerateDOCComment()<cr> function! GenerateDOCComment()

switch tab with vimscript?

我怕爱的太早我们不能终老 提交于 2020-01-07 03:07:24
问题 I want do something like this: check if a split named __Potion_Bytecode__ exists if exists, switch to the split with name if not, new a split named __Potion_Bytecode__ Here is code I am now doing: function! PotionShowBytecode() " Here I need to check if split exists " open a new split and set it up vsplit __Potion_Bytecode__ normal! ggdG endfunction 回答1: In lh-vim-lib, I have lh#buffer#jump() that does exactly that. It relies on another function to find a window where the buffer could be. "

Vim: bold highlighting only after reload solarized color scheme

有些话、适合烂在心里 提交于 2020-01-05 07:33:43
问题 I have the following minimal .vimrc file under $HOME directory (I'm on Ubuntu 14.04 LTS, using vim-gnome ): syntax on set background=dark colorscheme solarized And everything was highlighted as expected except for those supposed to be bold. By default, solarized color scheme should bold error s and todo s. However it doesn't work right away. For example, opening a file and invoking :he group-name , I get the following: You can see error and todo are not bold. If I now reload solarized by