Skip to content

floim/vim-pim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

pim.vim

This Vim plugin helps to make code sharing even easier over Pim.

Installation

If you use the Janus Vim distribution then

cd ~/.janus; git clone git://github.com/p-im/vim-pim.git pim

Otherwise if you use pathogen.vim:

cd ~/.vim/bundle; git clone git://github.com/p-im/vim-pim.git pim

Otherwise do whatever it is you normally do...

<Leader>

We'll assume that you have stuck with the Vim default <leader> of \ - if this is not the case then just replace all occurrences of \ with your <leader>

Functions

PimYank() \py

Yanks the selected text to the clipboard including Pim highlighting, for example lines 25-29 of notify-webhook.py:

def get_repo_name():
    if git(['rev-parse','--is-bare-repository']) == 'true':
        return os.path.basename(os.getcwd())
    else:
        return os.path.basename(os.path.dirname(os.getcwd()))

Would be yanked via 5\py as:

```notify-webhook.py:25
def get_repo_name():
    if git(['rev-parse','--is-bare-repository']) == 'true':
        return os.path.basename(os.getcwd())
    else:
        return os.path.basename(os.path.dirname(os.getcwd()))
```

Which would render in Pim as:

PimYankVisual() \py

As PimYank() above, except this runs in visual mode.

First enter visual mode (line-wise visual mode V works best) and make a selection, e.g. V} to select all lines up to the end of the paragraph.

Next, invoke: :call PimYankVisual() or type \py.

Finally go to the target chat on Pim and paste.

About

Vim plugin capable of Pim formatting/etc.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published