Skip to content

Instantly share code, notes, and snippets.

@ytturi
ytturi / vimrc.ytturi
Last active September 17, 2019 10:43
My own configurations for VIM. Recommended for everyone :-)
" SETUP
" Copy this file into /etc/vim/
" Set the correct mode `chmod 0644 /etc/vim/vim.ytturi`
" Edit main config file (`vim /etc/vim/vimrc`) and add this line:
" source /etc/vim/vimrc.ytturi
" Mouse mode == command line
set mouse=c
" Press <F2> to toggle pastemode
set pastetoggle=<F2>
@ytturi
ytturi / multiplatform_opener.py
Last active November 19, 2022 06:19
Python: Use a subprocess to open a file with it's default program on multi-platform OS
# -*- coding: utf-8 -*-
# ------------------------------------------------------
# Author: Ytturi
# Author's e-mail: ytturi@protonmail.com
# Original Gist: https://gist.github.com/ytturi/0c23ad5ab89154d24c340c2b1cc3432b
# Version: 0.1
# License: MIT
# ------------------------------------------------------
# This script allows the user to run the default program
# to open a file for it's given type or extension.