I am beginning to use Vim for C++ development.
Many of my lines are within deep for loops or if conditions that with indenting and wrapping disallowed gives a structure that looks like this. x
here is the cursor position.
___________________________________
a window in a tab |
{ |
{ |
//Really Long line |
//Another Long.|
x //Lo.|
|
____________________________________|
There are multiple lines that extend beyond the window's right margin (especially when there are vertical splits) and I have to scroll to the right to see the line in its entirety.
Is it possible to set up a command that can be toggled, dimensions increased or decreased that allows one to view the display of a window in a tab not from column 0 but from, say, column 10 to the right like so?
___________________________________
a window in a tab |
|
{ |
//Really Long line |
//Another Long line |
x //Long line |
|
____________________________________|
I tried using repeated zl
's (scroll right) to reach my desired scroll position. The trouble, however, is that whenever an empty line is encountered on pressing j
or k
(scrolling down or up), the display goes back to column 1 and the horizontal scrolled position is lost.
Standard: Cpp11, BasedOnStyle: LLVM, IndentWidth: 4, ColumnLimit: 0
I am unable to make out whether this corresponds to tab or spaces. Is there an easy check to figure out if my code uses tab or spaces within vim? If tab display width can be reduced, I should possibly force format and convert space to tabs it seems.