Linux - DesktopThis forum is for the discussion of all Linux Software used in a desktop context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Not sure if this might end up belonging in a Ubuntu specific thread, but here goes.
Despite the contradictory nature of it, I use vim to edit my ".emacs" file.
Naturally, I'm not as familiar with vim's ways.
The problem: I have a commented line in my ".emacs", this is one or more semicolons ( ; ), and I press return, and I get up to three semicolons on the next line.
My ".vimrc" is empty (or extremely minimal).
This is a major annoyance to me. Any ideas how to turn it off??
Well, that depends on what your return pressing should actually result in.
Insert a line break? Than you'll have to press "i" for insert first as you have to change between the different modes in vim - command mode, insert mode and so on.
I suggest reading a vim tutorial first for the handful of basic commands you actually need.
A minimal, more convenient .vimrc may contain the following lines:
Alright, I may have sounded a bit too new there. I am fairly well exercised with vim. Plenty enough to know the difference and the ins and outs of Insert and Command mode. And my vimrc has exactly that in it.
This may have something to do with vims Lisp/Scheme mode, if such a thing exists. So, to reiterate, in Insert mode, I start a line with one or more semicolons, press return, and Automatically, the next line gets populated with at most 3 semicolons at the beginning. It would be a handy feature if all you did was write comments, and never wanted to code.
When I use vim, I hit the escape key when I'm done one line, then hit the (o) key to start in insert mode on a new line below the one I'm on. To get a quick easy 30 minute tutorial on using vim, type: vimtutor in a terminal when a full version of vim is installed, not just vim-tiny.
Wildcat - I think this because of the syntax file.
Vim is inserting the semi-colon as a writing aid since it assumes you are continuing writing commentaries - you just have to backspace to delete the semi-colon and the next line won't have colon.
As it turns out, this has a lot to do with formatoptions (fo)
To turn it off on a per file basis:
Code:
:set fo-=ro
As yet I'm not sure how to disable it entirely, as it seems to be intertwined with autocmd's, that depend on the type of buffer, and indentation and other syntactic sugar.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.