Skip to content

Instantly share code, notes, and snippets.

@roblogic
Last active July 19, 2017 01:02
Show Gist options
  • Select an option

  • Save roblogic/e7e6d1bf15176e2714af925166f31885 to your computer and use it in GitHub Desktop.

Select an option

Save roblogic/e7e6d1bf15176e2714af925166f31885 to your computer and use it in GitHub Desktop.

Revisions

  1. roblogic revised this gist Jun 7, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion vim on windows.md
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    #### installer

    Self installing executable https://ftp.nluug.nl/pub/vim/pc/gvim80-069.exe
    Self installing executable https://ftp.nluug.nl/pub/vim/pc/gvim80-586.exe

    Or, use one of the mirrors on the vim.org site. http://www.vim.org/mirrors.php

  2. roblogic revised this gist Jun 6, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion vim on windows.md
    Original file line number Diff line number Diff line change
    @@ -28,7 +28,7 @@ save to d: drive then run it with command `:source d:\exb.vim`
    %s/----/-/g 'cut down the number of dashes
    %s/^\s\+// 'remove leading whitespace
    %s/ \s\+/ /g 'replace internal whitespace with 1 space char
    %s/\s\+$/ 'remove trailing white space
    %s/\s\+$// 'remove trailing white space


    #### Delete a sequence of N spaces
  3. roblogic renamed this gist May 8, 2017. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  4. roblogic revised this gist May 8, 2017. 1 changed file with 9 additions and 9 deletions.
    18 changes: 9 additions & 9 deletions vim notes.md
    Original file line number Diff line number Diff line change
    @@ -1,24 +1,24 @@
    ### installer
    #### installer

    Self installing executable https://ftp.nluug.nl/pub/vim/pc/gvim80-069.exe

    Or, use one of the mirrors on the vim.org site. http://www.vim.org/mirrors.php

    Avoid the "cream" version on sourceforge as it uses a different installer that doesn't play so well with Windows.

    ### vimrc
    #### vimrc

    Some nice settings for gVim on Windows. Copy to "C:\Program Files\Vim\vimrc"

    https://gist.github.com/papesch/283bdb4adb90c9592520ba72615dd000

    ### wombat color scheme
    #### wombat color scheme

    Copy the file wombat.vim to "C:\Program Files\Vim\vim80\colors\"

    https://github.com/vim-scripts/Wombat/blob/master/colors/wombat.vim

    ### Tidy up excess whitespace and dashes
    #### Tidy up excess whitespace and dashes

    vimscript -- handy for copying carina screenshots to ET

    @@ -31,25 +31,25 @@ save to d: drive then run it with command `:source d:\exb.vim`
    %s/\s\+$/ 'remove trailing white space


    ### Delete a sequence of N spaces
    #### Delete a sequence of N spaces

    Example, N=70 (tidies output from sql*plus)

    :%s/ \{70}//g

    ### Remove all the namespace guff from XML RQ or RS
    #### Remove all the namespace guff from XML RQ or RS

    :%s/ xmlns:.\{-}>/>/g

    ### Replace annoying hex characters `<91> <92>`
    #### Replace annoying hex characters `<91> <92>` with straight single quote

    :%s/[\x91\x92]/'/g

    ### Replace curly double quotes
    #### Replace curly double quotes

    :%s/[“”]/"/g

    ### Greedy vs Non Greedy Match
    #### Greedy vs Non Greedy Match

    Greedy Match:
    get _everything_ between `<FTI>` and `</FTI>` tags in a CAML Event Message
  5. roblogic created this gist May 8, 2017.
    62 changes: 62 additions & 0 deletions vim notes.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,62 @@
    ### installer

    Self installing executable https://ftp.nluug.nl/pub/vim/pc/gvim80-069.exe

    Or, use one of the mirrors on the vim.org site. http://www.vim.org/mirrors.php

    Avoid the "cream" version on sourceforge as it uses a different installer that doesn't play so well with Windows.

    ### vimrc

    Some nice settings for gVim on Windows. Copy to "C:\Program Files\Vim\vimrc"

    https://gist.github.com/papesch/283bdb4adb90c9592520ba72615dd000

    ### wombat color scheme

    Copy the file wombat.vim to "C:\Program Files\Vim\vim80\colors\"

    https://github.com/vim-scripts/Wombat/blob/master/colors/wombat.vim

    ### Tidy up excess whitespace and dashes

    vimscript -- handy for copying carina screenshots to ET

    save to d: drive then run it with command `:source d:\exb.vim`

    exb.vim
    %s/----/-/g 'cut down the number of dashes
    %s/^\s\+// 'remove leading whitespace
    %s/ \s\+/ /g 'replace internal whitespace with 1 space char
    %s/\s\+$/ 'remove trailing white space


    ### Delete a sequence of N spaces

    Example, N=70 (tidies output from sql*plus)

    :%s/ \{70}//g

    ### Remove all the namespace guff from XML RQ or RS

    :%s/ xmlns:.\{-}>/>/g

    ### Replace annoying hex characters `<91> <92>`

    :%s/[\x91\x92]/'/g

    ### Replace curly double quotes

    :%s/[“”]/"/g

    ### Greedy vs Non Greedy Match

    Greedy Match:
    get _everything_ between `<FTI>` and `</FTI>` tags in a CAML Event Message

    /<FTI.*\/FTI>

    Non Greedy Match:
    find the first match for `<FTI>` and `</FTI>` tags then stop matching & restart the search

    /<FTI.\{-}\/FTI>