Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
gajim
gajim
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 196
    • Issues 196
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 21
    • Merge Requests 21
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • gajim
  • gajimgajim
  • Wiki
    • Community
  • gajimvimpastebin

Last edited by Daniel Mar 20, 2018
Page history

gajimvimpastebin

VimPastebin

Original script is missing, links are dead. Possible alternative:

https://github.com/kirotawa/vimpastebin

The VimPastebin script is a Vim plugin script that posts selected text to the Pastebin of your choice, and optionally sends the URL to your pasted text as message in Gajim to someone in your roster. The syntax is chosen from the current filetype in the Vim editor. For example, if you are editing a Python file, the text sent to Pastebin will automatically be highlighted with Python syntax.

Requirements

This script is mostly written in Python, so it will only work if your Vim was compiled with the --enable-pythoninterp=yes configure option. To see if your installed Vim is compiled with this option, simply type the :version command inside Vim and look for +python. If you see -python in the list, this script will not work, otherwise you're golden!

Installation

Drop the script into your ~/.vim/plugin directory or somewhere else in your $VIMRUNTIME path. It will be sourced automatically next time you start Vim. You can source it manually by typing :source /path/to/script if you like.

There are a couple of configuration options in the script that should be modified for your particular settings. You can set your preferred Pastebin on line 38, and your preferred username on line 40. By default, the script included on this wiki page will post to http://pastebin.com as the user "vimuser".

Usage

To use the script is very simple. Just visually block ( Shift + V ) the lines of code you want to send to the Pastebin and enter the command :PasteCode. The blocked text will be sent to the Pastebin and the new URL will be shown on the Vim statusline. Optionally, you could enter the command :PasteGajim somename@somejid.org to send the new URL to the JID somename@somejid.org providing that JID appears in your roster. To make it even easier, you can send it to someone in your roster by only specifying their name, like :PasteGajim dcraven will send it to the user named 'dcraven'. This is handy if you cannot remember the person's full JID.

That's It!

That's pretty much all there is to it. Enjoy!

Clone repository
  • Gajim 0.16 MacOS
  • GajimFaq
  • community
    • Community
    • gajimvimpastebin
  • development
    • Development
    • Firststepsfordebugging
    • MUC Invite Logic
    • Ubuntu Development Setup
    • codingstandards
    • databaseextract
    • devdebian
    • devgit
    • devtranslate
    • filetransfer
    • gajimdevsslang
View All Pages