This is a bizarre problem that, from searching relentlessly, appears I'm the only one in the known universe to have.
On my Ubuntu 18.04 server I'm trying to do some HTML edits with vim, but regardless of if I type "<" or ">" in vim they all come out like ">".
I'm at a complete loss here, I've never seen vim bug out on me so badly.
It's a problem with Digital Ocean's Web console, not VIM. There's currently no solution. Sorry to bother the VIM community with this issue.
Related
I have an instance of vi on a remote server that is not behaving like it used to, and I'm not sure what made this happen.
On my local shell, (and the remote server before this started happening), if I scroll with my mouse/touchpad, it would navigate the cursor within vim. I have checked my .vimrc and there's nothing in it relating to the mouse, and I did not make any changes to it before this issue started.
The only thing I can think of is that a few weeks ago, I was trying to figure out how I could split two files in the same vi instance so I could yank from one file to another, and I tried some : commands that I didn't really understand (didn't get any productive results). And also, I ran tmux once, but I don't think there are any . files that are applying unwanted settings (not sure).
I can't find anything to check the vi settings being applied, but I know that my .vimrc is working, and it's not anything in there (if I comment everything out it still behaves this way).
I just want my vi to respond the same way.
Describing the problem more exactly:
If I scroll, the cursor doesn't move, instead it scrolls on the terminal window, and it shows the previous bash commands instead of scrolling the file being edited. If I navigate using vim keys, it still works.
Randomly, I discovered that it actually had to do with the a specific terminal instance that was causing the issue. Closed it, opened a new one, no issue now. If anyone has any insight on why this could've been, I'd love to know.
.vimrc applies to vim not vi, doesn't it ?
the problem of scrolling might come from your terminal emulator as well.
I usually use embedded terminal in VS code which is not ideal (since it's not made for administration ...) but it's practical with keybinds to jump from one window to another, copy paste ...
I know some colleagues who use, mobaXterm or mremoteNG on windows.
I know I should give a go to Terminator, but it's on linux only and I don't want to run a local vm just for that.
SearchComplete breaks the expected functionality of {c|d|y}/pattern, effectively reducing them to /pattern.
SearchComplete breaks use of /<Up> to search history on some systems - it seems like it is specifically a problem in non-gui vim compiled as 64bit displayed within a terminal emulator. This problem results in typing `/ switching to Insert mode and inserting the letter 'A' on a new line, instead of searching the history. I tried to figure out the bug, but I couldn't. Removing SearchComplete fixes the problem.
This is an excerpt I saw from http://vim.wikia.com/wiki/Script:474.
I was wondering if there is a workaround for this problem. Because both of these features ar so useful.
The last update of that plugin is from 2002; it's probably unmaintained if the author didn't respond to the feedback on the Vim Tips Wiki page.
You can try the alternative CmdlineComplete - complete command-line (: / etc.) plugin; this works well for me.
It's been like this forever really. Because I worked both on Ubuntu and Mac OS X interchangeably I didn't care as much. Now I think maybe it's time to finally find out what is wrong with it.
THE PROBLEM: When I switch tabs or navigate the lines with arrows or J, K keys and when I do it repeatedly (as if when trying to find the right tab holding Ctrl and hitting Tab) it seems to be delaying the action. When I stop hitting the keys gVim may still be finishing the operations (for instance, I stop hitting Ctrl+Tab, gVim may switch 5 more tabs - the number depends on how long I've been hitting Ctrl+Tab - before it stops).
MacVim with similar settings in .vimrc works just fine. The delays are present both when Compiz is turned off and turned on. Any ideas?
I have experienced similar sluggishness when working with large files. I've found that folded blocks makes it worse, so try and open all folds - zR.
This is a know bug in Ubuntu. Until it is patched in the official repositories, you can use this PPA repository, which contains a fixed version of Vim. I just tried it and it fixes the issue.
I have used Stata and gVim on Windows for a while now. Recently I have switched to Linux, and I am planning to also change from Stata to R.
A friend of mine is using R and Emacs ESS which seems to work perfect, however i'd rather like to keep using vim. I have installed the vim-r-plugin2, however, i can only send code to a seperate terminal running R. I would much rather split my screen into a buffer running R and one buffer with my .R file, and then send code from one to the other. With ESS in Emacs this seems to work, you can run a terminal/R in a buffer without a problem. I haven't found a way to make this work. The R plugin for vim uses screen, and the only way to open a buffer running a shell I could find is the Conque Shell plugin.
I know that unlike Emacs, Vim is designed to be a simple text editor. However, having R run in a buffer seems just so much more practical.
I hope my problem is understandable, please bear with me I only recently switched to Linux and know virtually nothing about programming besides statistics. Thanks!
If you do not need to input unicode, you can consider using ConqueShell plugin.
In the meanwhile, the 'evil' (extensible vi emulation layer) mode has matured. This is a vim emulator running in Emacs and works quite well for me.
Another option, and forgive me for pointing you back to EMACS,
viper-mode
http://www.informatik.uni-hamburg.de/RZ/software/emacs/viper/viper_3.html
It's an EMACS mode that makes EMACS feel more like Vim, while giving you full access to the wonderful, mind-boggling complexity of EMACS if you ever want it.
While surfing, I came to know that somebody has done Tower of Hanoi using vim. WOW!!!
Can you people share what all cool things you have been doing in vim.
Edit: Not sure about the Tower of Hanoi solution using vim being all that useful. But I think this question should be re-opened to allow people to comment on any useful things that they've done using vim. For me? See my answer below. (-:
vim has a set of commands that integrate with development tools such as make, gcc, and ctags. You can build your project, navigate to warnings and errors, and jump to function/variable definitions without leaving the editor:
:make builds the project.
:cl lists warnings and errors.
:cc takes you to the to line in the source code that generated the current error.
:cn navigates to the next error.
:cp navigates to the previous error.
:tag name navigates to the definition of the token name. (See man ctags to generate an index of tokens; sometimes make tags will do this automatically.)
Pressing Ctrl+] navigates to the definition of the token under the cursor.
I'm using vim to syntax-color code in my blog and lecture notes. A single Perl line
system "$vimrt\\gvim.exe", qq{
-c "edit /tmp/tmpcode.$ext "
-c "source $vimrt/syntax/2html.vim"
-c "write! /tmp/tmpcode.html"
-c "qa!"};
converts the code into nicely-colored HTML. I know there are stand-alone tools for doing this, but vim is already installed on my system, so this is one less tool to install.
I found myself struggling to be more efficient in vim compared to other non-modal text editors until I learned about "text-objects". Understanding this concept really improved my productivity and also gave me a new way of looking at text which in turn made it easier to deeply understand other vim concepts that I had only understood ephemerally before.
:help text-objects
I was working on a system that had massive log files. We're talking 30,000 10MB logs.
Per day!
Distinguishing between log messages that were coming from the middleware (same company but custom rolled) and our application was getting tedious.
That is until I wrote some custom vim syntax parsing so that anything vim displayed in green was from the middleware (done by the guys in Sophia Antipolis near Cannes) as opposed to anything vim displayed in blue that was from our application software that sat over the top of the SA code.
I also added highlighting to really make exceptions stand out with white lettering on a read background!
Made life so much easier! And it wasn't that hard to do!
Thanks vim!
I couple of months ago I wrote a vim script to save a complete history of all my edits, so I could inspect and measure my programming performance.
I'm using vim a lot recently to edit XML files. I got the xmledit plugin for vim working. Now vim creates closing tags for me, I can enclose highlighted text in an XML tag, and jump to balancing XML tags. It saves a lot of repetitive typing, reduces mistakes, and increases my productivity.