vim-plugin

Refactoring C/C++ in Vim (e.g. method extraction like in Eclipse)

本小妞迷上赌 提交于 2019-12-03 05:38:06
问题 Are there any plugins or built-in methods in Vim for performing refactoring on C or C++ code, something like the refactoring tools in Eclipse? I'm especially keen on the extract method refactoring tool from Eclipse that will determine parameters from new methods and typically also guess a variable to use as the return value. 回答1: No, although Vim is a good environment for editing, and can be customised in a lot of ways (code folding, syntax colouring, macro expansion etc.) most of these are

vim-surround not working for me. s key deletes instead of surrounds

你说的曾经没有我的故事 提交于 2019-12-03 05:29:23
Just installed the surround plugin. New buffer, type Hello World. Say I want to surround that with quotes. In normal mode, V to get into visual mode, s to get into surround Except it doesn't, s deletes the entire line. The default visual mode mapping of surround.vim is Shift - S , not lowercase s. You can check whether it's defined with :verbose vmap S . Do the other surround.vim mappings ( ys , cs , ...) work? If not, check :scriptnames and :set runtimepath? for troubleshooting. This can also be a key binding collision with the yankstack plugin. To fix it, append call yankstack#setup() to

How can I make VIM play typewriter sound when I write a letter?

断了今生、忘了曾经 提交于 2019-12-03 01:04:54
问题 After a lot of writing in Q10 on Windows, I got used to the typewriter sound it makes every time you press a key. At least for me it feels great to have this sort of sound feedback. On Linux on the other hand, I love writing it VIM, because of it's editing features. How could I add this functionality to VIM? Simply said, I want to play a sound every time I press a key in the insert mode. 回答1: Alright, this kinda crazy, but it appears to work. First, grab yourself a typewriter sound in aiff

Refactoring C/C++ in Vim (e.g. method extraction like in Eclipse)

自古美人都是妖i 提交于 2019-12-02 19:08:22
Are there any plugins or built-in methods in Vim for performing refactoring on C or C++ code, something like the refactoring tools in Eclipse? I'm especially keen on the extract method refactoring tool from Eclipse that will determine parameters from new methods and typically also guess a variable to use as the return value. AlBlue No, although Vim is a good environment for editing, and can be customised in a lot of ways (code folding, syntax colouring, macro expansion etc.) most of these are done on the syntax level, rather than the semantic level. Even the code folding just matches up

How can I make VIM play typewriter sound when I write a letter?

假装没事ソ 提交于 2019-12-02 16:23:37
After a lot of writing in Q10 on Windows , I got used to the typewriter sound it makes every time you press a key. At least for me it feels great to have this sort of sound feedback. On Linux on the other hand, I love writing it VIM, because of it's editing features. How could I add this functionality to VIM? Simply said, I want to play a sound every time I press a key in the insert mode. Alright, this kinda crazy, but it appears to work. First, grab yourself a typewriter sound in aiff format. Then put that typewriter sound in ~/.vim/support/my_typewriter_sound.aiff . Then add the following to

Transitioning to vim. Having issues with indentation

妖精的绣舞 提交于 2019-12-02 12:03:23
问题 I am recovering from a surgery, thusly, I am transitioning to VIM. As I starting point, I've opted to use the vim-sensible plugin as the foundation of my configuration. Additionally, I've installed the 'vim-rails' and 'vim-ruby' plugins. These are all loaded via Pathogen. For whatever reason, the plugins are not adjusting indentation settings in accord with filetype. Tabs seem locked to 9 columns. I am able to set them manually, but obviously this is not ideal. Here is my .vimrc. As you can

Vim - How to make your own mapping repeatable?

感情迁移 提交于 2019-12-01 18:21:29
I have following mappings in my vimrc: nmap <Leader>h1 yyp<c-v>$r= nmap <Leader>h2 yyp<c-v>$r- I'd like to repeat <Leader>h1/2 with . There exist the repeat.vim plugin by Tim Pope with following usage line silent! call repeat#set("\<Plug>MyWonderFulMap", v:count) I tried using it in the following way: nnoremap <silent> <Plug>MyWonderfulMap :normal yyp<c-v>$r= silent! call repeat#set("\<Plug>MyWonderfulMap", v:count) nmap <Leader>h1 <Plug>MyWonderfulMap It does not work. I know it is not a serious complication, however, I am interested to use the repeat.vim for own mappings. The repeat#set()

Disable underscore “_” shortcut inserting “<-” in Vim R plugin [duplicate]

别等时光非礼了梦想. 提交于 2019-12-01 04:02:41
This question already has an answer here: Vim: underscore(_) automatically converted to (<-) 4 answers By default, the Vim-R-plugin inserts <- whenever I type or paste an underscore _ . This creates problems when I paste stuff like geom_bar , which becomes geom <- bar . Is there a way to turn this short-cut off? I tried looking at the manual (scroll down to Edit section) but couldn't figure out how to do it. I'm using Vim-R-plugin Version 0.9.9.9 for Vim version 7.4. From the help page of the plugin: 6.3. Assignment operator and Rnoweb completion of code block ... To completely disable this

Disable underscore “_” shortcut inserting “<-” in Vim R plugin [duplicate]

女生的网名这么多〃 提交于 2019-12-01 02:07:35
问题 This question already has answers here : Vim: underscore(_) automatically converted to (<-) (4 answers) Closed 5 years ago . By default, the Vim-R-plugin inserts <- whenever I type or paste an underscore _ . This creates problems when I paste stuff like geom_bar , which becomes geom <- bar . Is there a way to turn this short-cut off? I tried looking at the manual (scroll down to Edit section) but couldn't figure out how to do it. I'm using Vim-R-plugin Version 0.9.9.9 for Vim version 7.4. 回答1

Vim Python indentation not working?

白昼怎懂夜的黑 提交于 2019-11-30 14:50:19
问题 I have Vim 7 (enhanced) on CentOS 5, and it comes with all the usual Vim plugins/scripts ready to go. $ find /usr/share/vim/vim70/ -name \*python\* /usr/share/vim/vim70/syntax/python.vim /usr/share/vim/vim70/ftplugin/python.vim /usr/share/vim/vim70/indent/python.vim /usr/share/vim/vim70/autoload/pythoncomplete.vim I would think that when opening a file ending in .py ( vim file.py ) it would automatically load these plugins, but I am not sure that is the case. What I want is: Press TAB and