Code Monkey home page Code Monkey logo

cecutil's Introduction

This is a mirror of http://www.vim.org/scripts/script.php?script_id=1066

 [CECUTIL V15 OR LATER REQUIRES VIMBALL V18 OR LATER FOR UNPACKING]

These routines are used by several of my utilities.  I'm loading them onto vim.sf.net to make it easier for GetLatestVimScripts to automate updates with them.

Marks:
     call SaveMark(markname)       let savemark= SaveMark(markname)
     call RestoreMark(markname)    call RestoreMark(savemark)
     call DestroyMark(markname)
     commands: SM RM DM

Window Position:
     call SaveWinPosn()        let winposn= SaveWinPosn()
     call RestoreWinPosn()     call RestoreWinPosn(winposn)
    \swp : save current window/buffer's position
    \rwp : restore current window/buffer's previous position
     commands: SWP RWP

User Maps:
    call SaveUserMaps(mapmode,maplead,mapchx,suffix)

    This function sets up a script-variable (ie. a variable that can generally be accessed only from within cecutil's own functions; see |s:|) called s:restoremap.  The selected user's maps are appended to this variable; the RestoreUserMaps() (|cecutil-restoreusermaps|) function uses the contents of this variable to restore user maps.

    Some examples follow:

        call SaveUserMaps("n","","webWEBjklh$0%;,nN","HiMtchBrkt")
            normal mode maps for w, e, b, W, E, B, j, k, l, etc
            (if any) are all saved in the variable
            s:restoremaps_HiMtchBrkt >

        call SaveUserMaps("n","","<up>","DrawIt")
            the normal mode map (if any) for the <up> key is saved in
            the variable s:restoremaps_DrawIt >

        call SaveUserMaps("n","",":F(","HiMtchBrkt")
            the normal mode map for F( (if any) is saved in the
            variable s:restoremaps_HiMtchBrkt

    call RestoreUserMaps(suffix)

        The usermaps saved by SaveUserMaps() with the given suffix will be restored (ie. s:restoremaps_{suffix}).  Example:

        call RestoreUserMaps("HiMtchBrkt")
            will restore all user maps redefined for the HiMtchBrkt plugin

(alpha/beta version available at http://mysite.verizon.net/astronaut/vim/index.html#CECUTIL)

cecutil's People

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

haifengkao

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.