Vim has this !
special character that will run any shell command without having to close it. Here are 3 ways I often use it:
1. Format a JSON blob:
:%!python -m json.tool
2. Count number of characters in a file:
"use client" | |
import { WithSidebar } from "@/components/with-sidebar" | |
export const Dashboard = () => { | |
return ( | |
<WithSidebar | |
sidebarContent={SidebarContent} | |
mobileDashboardHeader={CustomHeader}> | |
<div className="p-10"> |
/** | |
* Provides requestAnimationFrame in a cross browser way. | |
* @author paulirish / http://paulirish.com/ | |
*/ | |
if ( !window.requestAnimationFrame ) { | |
window.requestAnimationFrame = ( function() { | |
return window.webkitRequestAnimationFrame || |
app.directive('rmHold', ['$timeout', function($timeout) { | |
return { | |
restrict: 'A', | |
link: function(scope, elem, attrs) { | |
var isActive = false; | |
var currentTimeout = null; | |
var startCoords = { | |
x: null, | |
y: null | |
} |
// Mocked Service | |
angular.module('mock.users', []). | |
factory('UserService', function($q) { | |
var userService = {}; | |
userService.get = function() { | |
return { | |
id: 8888, | |
name: "test user" | |
} |
public with sharing class ChatterUtils { | |
// makes a simple chatter text post to the specified user from the running user | |
public static void simpleTextPost(Id userId, String postText) { | |
ConnectApi.FeedType feedType = ConnectApi.FeedType.UserProfile; | |
ConnectApi.MessageBodyInput messageInput = new ConnectApi.MessageBodyInput(); | |
messageInput.messageSegments = new List<ConnectApi.MessageSegmentInput>(); | |
requirejs(['cordova.js'], | |
function () { | |
// start of require | |
// cordova is now available globally | |
var exec = cordova.require('cordova/exec'); | |
var app = { | |
// Application Constructor |
<?php | |
/** | |
* A helper file for Laravel 5, to provide autocomplete information to your IDE | |
* Generated for Laravel 5.5.13 on 2017-09-28. | |
* | |
* @author Barry vd. Heuvel <[email protected]> | |
* @see https://github.com/barryvdh/laravel-ide-helper | |
*/ | |
namespace { | |
exit("This file should not be included, only analyzed by your IDE"); |
{ | |
"folders": | |
[ | |
{ | |
"path": "Leanpub/sublime-productivity", | |
"folder_exclude_patterns": ["epub_images", "convert_html", "preview", "published"], | |
"file_exclude_patterns": [".gitignore", "*.sublime*", "*Icon*"] | |
}, | |
{ | |
"path": "SublimeTextTips" |