Questions tagged [formatting]

Questions about how to format a file with vim - this includes, but is not limited to, foldings, indents, wrappings, and so on.

Filter by
Sorted by
Tagged with
1
vote
1answer
131 views

Is there a way to have sidescrolloff behave differently depending if I am end of a line?

I work in two broadly different ways in vim (that are relevant to this question): I am writing text or markdown-formatted content, writing paragraphs of text. In this case I am generally writing new ...
5
votes
1answer
335 views

How can I make text formatting ignore concealed characters?

Question Working with text and various markup languages in Vim I have recently experimented with the conceal feature to hide some of the more verbose markup. I switch conceal off when writing and ...
1
vote
1answer
178 views

Change formating of `\im' command in c.vim

I have recently installed the c.vim plugin. The only issue is when I type \im (automatically adds the main function) this is the way how it displays it. int main ( int argc, char *argv[] ) { ...
22
votes
3answers
2k views

How to write vertically?

Lets say I want to produce the following text in my document: % % Not Important % O -------------------------> % | % S | % o | % m | % e | % | % M | % s | % g | % | % ...
58
votes
3answers
20k views

How can I get vim to stop putting comments in front of new lines?

I'm editing my .vimrc file, and I am including comments. When I have a comment like this: " example comment And then hit enter at the end of the line after finishing the comment, the next line is ...
26
votes
4answers
2k views

How can I reformat a multi-line string in vim when using the Python filetype?

Let's assume I am editing some Python code in vim that looks a bit like: myobj.myfunc("Some string parameter that goes on and on and on and on and sometimes doesn't" "split very" ...

1 2 3
4