OnionKnight wrote:

* Is it possible to make the cursor stay at it's position even after
scrolling it out of view?
Not at the current time.

* At the beginning of an indented line, why does normal mode put the cursor
at the end of the first tab whereas insert mode is position at the beginning
of the line like I think it should? It's annoying to move around in code
like that.

I'm not entirely sure what you want here; does having

 set nosol

in your <.vimrc> help?

* Is it possible to enter insert mode for files that aren't modifiable?
Obviously any changes can't be saved but the buffer shouldn't be any
problems to modify.
set ma noro

* Is it possible to close tabs with the middle mouse button?

Try mapping it; put the following into your <.vimrc>:

 nmap <middlemouse> :tabc<cr>

* I wanted the Home-button to act so that it first jumps to the first
non-whitespace character of the current line (i.e. skip the indentation) and
if Home is pressed when you're already at the first non-whitespace character
or before then it should jump to the real beginning of the line, column #1.
I made this function:
function! HomeKey ()
        let c = col(".")
        if c == 1
                w
        else
                g0w
                if col(".") >= c
                        g0
                endif
        endif
endfunction

You're getting your modes confused. If that "if", for example, was executed in normal mode, it would enter insert mode and insert an "f" character. However, its in command mode; and that "w" is being executed in command mode, too (and it means write the file). Try using

 norm! w

instead.  Likewise with the "g0w" :

 norm! g0w

etc.

* In gvim, is it possible to have a drag-and-drop action open the dragged
file into a new tab instead of a new buffer? Using the menu is just tedious,
and you can't select multiple files either.

Can't answer that -- I never use the mouse to drag-and-drop. Even if you set up some autocmds to do this, if you drop the same file onto vim you'll still get extra tabs unless your code sweeps through all the tabs
and checks for a name match first.

* I want to check a string if it begins with something but I have no clue
why. I was thinking of a regexp but the only way to use matching regexps is
for highlights and substition regexps seems to operate on the whole file or
a selection and no way to use them on strings.
Regexp's have nothing in particular to do with highlights. One can set 'hls' mode and get matches to show up, but that's like saying I want to build a cupboard but wood is always used to build houses.
Substitutes act over specific ranges:

 :7,10s/abc/def/

will only change lines 7-10, not the whole file. By string, do you mean something with double-quotes?
Just search for it:   /"BEGINNING_OF_STRING

Regards,
Chip Campbell

Reply via email to