Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • function! GotoCFile()
        let cfile_prefix     = '#\s*cfile:\s*'
        let cfile_expression = cfile_prefix . '\w\+'
        if match(getline('.'), cfile_expression) > -1
            let good_line = matchstr(getline('.'), cfile_expression)
            " probably need some more interesting way to make a relative path
            " also need to get rid of any stuff that might

    • Out of curiosity, how did you learn Vim scripting? Is there a decent tutorial out there or did you go through the docs?

      • > how did you learn Vim scripting?

        I'm not sure I'd say that I've learned it. When I started at Rentrak, they already had ,gi ,gt ,t and ,T. I just copy/paste/tweaked from there for the most part. Before I started at Rentrak, I'd primarily been a BBEdit user, with ten-year-rusty vi experience. Rentrak was the first place I used Vim.

        > Is there a decent tutorial out there or did you go through the docs

        There may well be a decent tutorial. If so, I never found it. Instead I spent way to much time banging my head against the :help docs. I agree that Vim's macro language bites donkey dorks.

        Bruce has been extending the emacs support at work to the point that it does everything the vim macros do and tons more For example, you can type a random function like create_test_whatever in the middle of some bit of code and hit a keystroke to have emacs find the appropriate place from which to import that sucker, add the appropriate use line at the appropriate place in the code, format it and sort it to look pretty with the other use lines, and return you to editing where you typed that function. Very slick.

        Elisp looks like a comparative dream to work with. At this point, the only thing holding me back is the lack of quick keyboard editing/navigation. The functionality for extensions is better than vim, but the plain vanilla functionality still strikes me as less efficient than vim.

        Anyhow, I sypathize with your struggle to not strangle vim :)