Compare commits
2 Commits
master
...
0a34aec505
| Author | SHA1 | Date | |
|---|---|---|---|
| 0a34aec505 | |||
| f4a24ba664 |
6
flake.lock
generated
6
flake.lock
generated
@@ -2,11 +2,11 @@
|
||||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1755615617,
|
||||
"narHash": "sha256-HMwfAJBdrr8wXAkbGhtcby1zGFvs+StOp19xNsbqdOg=",
|
||||
"lastModified": 1750506804,
|
||||
"narHash": "sha256-VLFNc4egNjovYVxDGyBYTrvVCgDYgENp5bVi9fPTDYc=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "20075955deac2583bb12f07151c2df830ef346b4",
|
||||
"rev": "4206c4cb56751df534751b058295ea61357bbbaa",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
55
flake.nix
55
flake.nix
@@ -2,52 +2,30 @@
|
||||
description = "Timo's Shared Nix Modules";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, ... }: {
|
||||
# Set up formatter.
|
||||
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixpkgs-fmt;
|
||||
|
||||
# Global all-hosts configuration
|
||||
outputs = { self, nixpkgs, ... }:
|
||||
{
|
||||
# System Modules
|
||||
nixosModules.default = { ... }: {
|
||||
imports = [
|
||||
./system/default/editor.nix
|
||||
./system/default/nix.nix
|
||||
./system/default/packages.nix
|
||||
./system/default/prompt.nix
|
||||
./system/default/scripts.nix
|
||||
./system/default/ssh-authorized-keys.nix
|
||||
];
|
||||
};
|
||||
|
||||
# Linux specific system configuration
|
||||
nixosModules.linux = { ... }: {
|
||||
imports = [
|
||||
./system/linux/i18n.nix
|
||||
./system/linux/openssh.nix
|
||||
./system/linux/system.nix
|
||||
./system/linux/user-tb.nix
|
||||
];
|
||||
};
|
||||
|
||||
# MacOS specific system configuration
|
||||
nixosModules.macos = { ... }: {
|
||||
imports = [
|
||||
./system/macos/environment.nix
|
||||
./system/macos/fonts.nix
|
||||
./system/macos/hotkeys.nix
|
||||
./system/macos/nix.nix
|
||||
./system/macos/system.nix
|
||||
./system/macos/yabai.nix
|
||||
];
|
||||
};
|
||||
|
||||
# Tools on all development machines
|
||||
nixosModules.develop = { ... }: {
|
||||
imports = [
|
||||
./system/develop/packages.nix
|
||||
./system/develop/scripts.nix
|
||||
./system/macos/fonts.nix
|
||||
];
|
||||
};
|
||||
|
||||
@@ -61,33 +39,10 @@
|
||||
];
|
||||
};
|
||||
|
||||
# Add private homelab and cloud host aliases
|
||||
homeManagerModules.private = { ... }: {
|
||||
imports = [
|
||||
./home/private/git.nix
|
||||
./home/private/ssh-hosts.nix
|
||||
];
|
||||
};
|
||||
|
||||
# MacOS specific home configuration
|
||||
homeManagerModules.macos = { ... }: {
|
||||
imports = [
|
||||
./home/macos/home.nix
|
||||
];
|
||||
};
|
||||
|
||||
# Emacs Configuration
|
||||
homeManagerModules.develop = { ... }: {
|
||||
imports = [
|
||||
./home/develop/emacs.nix
|
||||
];
|
||||
};
|
||||
|
||||
# Claude Code configuration
|
||||
homeManagerModules.claude = { ... }: {
|
||||
imports = [
|
||||
./home/claude/config.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
{ lib, ... }:
|
||||
{
|
||||
# Copy Claude Code configuration files to ~/.claude/
|
||||
# Using activation script instead of home.file to copy (not symlink) files
|
||||
home.activation.copyClaudeCommands = lib.hm.dag.entryAfter ["writeBoundary"] ''
|
||||
$DRY_RUN_CMD mkdir -p $VERBOSE_ARG $HOME/.claude/commands
|
||||
$DRY_RUN_CMD cp $VERBOSE_ARG ${./config/commands/commit.md} $HOME/.claude/commands/commit.md
|
||||
$DRY_RUN_CMD cp $VERBOSE_ARG ${./config/commands/go-plan.md} $HOME/.claude/commands/go-plan.md
|
||||
$DRY_RUN_CMD chmod $VERBOSE_ARG 644 $HOME/.claude/commands/*.md
|
||||
'';
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
Make another git commit -- read the git diff of staged files and write a good long description
|
||||
@@ -1 +0,0 @@
|
||||
Write the detailed plan to PLAN.md and start.
|
||||
@@ -4,7 +4,7 @@
|
||||
enable = true;
|
||||
lfs.enable = true;
|
||||
|
||||
settings = {
|
||||
extraConfig = {
|
||||
pull.ff = "only";
|
||||
|
||||
merge.conflictstyle = "zdiff3";
|
||||
|
||||
@@ -1,18 +1,5 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
snippetsPath = ./emacs/snippets;
|
||||
extraSnippetDirs = config.tb.emacs.extraSnippetDirs;
|
||||
allSnippetDirs = [ "${snippetsPath}" ] ++ extraSnippetDirs;
|
||||
snippetDirsLisp = lib.concatMapStringsSep " " (d: ''"${d}"'') allSnippetDirs;
|
||||
in
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
options.tb.emacs.extraSnippetDirs = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
default = ["~/.emacs.d/snippets/"];
|
||||
description = "Additional snippet directories for yasnippet";
|
||||
};
|
||||
|
||||
config = {
|
||||
programs.emacs = {
|
||||
enable = true;
|
||||
|
||||
@@ -37,7 +24,6 @@ in
|
||||
coffee-mode # CoffeeScript programming language
|
||||
csharp-mode # C# programming language
|
||||
groovy-mode # Groovy/Jenkins pipeline scripting
|
||||
go-mode # Go programming language
|
||||
haskell-mode # Haskell functional programming
|
||||
js2-mode # Enhanced JavaScript editing mode
|
||||
lua-mode # Lua scripting language
|
||||
@@ -98,7 +84,7 @@ in
|
||||
|
||||
# === CODE FORMATTING AND CLEANUP ===
|
||||
web-beautify # Format and beautify web code (HTML/CSS/JS)
|
||||
ethan-wspace # Automatically clean up whitespace on save
|
||||
ws-butler # Automatically clean up whitespace on save
|
||||
|
||||
# === PARENTHESES AND STRUCTURE EDITING ===
|
||||
paredit # Balanced parentheses editing for Lisp-like languages
|
||||
@@ -128,16 +114,7 @@ in
|
||||
swift-ts-mode # Swift programming with tree-sitter
|
||||
];
|
||||
|
||||
extraConfig = builtins.readFile ./emacs/custom.el + ''
|
||||
|
||||
;; Yasnippet configuration (generated by nix)
|
||||
(use-package yasnippet
|
||||
:init
|
||||
(setq yas-snippet-dirs '(${snippetDirsLisp}))
|
||||
:config
|
||||
(yas-reload-all)
|
||||
(yas-global-mode 1))
|
||||
'';
|
||||
extraConfig = builtins.readFile ./emacs/custom.el;
|
||||
};
|
||||
|
||||
# System packages required by various emacs packages
|
||||
@@ -145,5 +122,4 @@ in
|
||||
# Search and file utilities
|
||||
ripgrep # Required for rg package
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -386,16 +386,22 @@ frame if FRAME is nil, and to 1 if AMT is nil."
|
||||
try-expand-list
|
||||
try-expand-line)))
|
||||
|
||||
;; Clean up whitespace
|
||||
(use-package ethan-wspace
|
||||
:ensure t
|
||||
:diminish ethan-wspace-mode
|
||||
;; Yet another snippet extension for Emacs.
|
||||
(use-package yasnippet
|
||||
:init
|
||||
(setq yas-snippet-dirs '("~/.emacs.d/snippets/"))
|
||||
:config
|
||||
;; Enable globally
|
||||
(global-ethan-wspace-mode 1)
|
||||
(yas-reload-all)
|
||||
(yas-global-mode 1))
|
||||
|
||||
;; Customize what to clean
|
||||
(setq mode-require-final-newline nil)) ; ethan-wspace handles this
|
||||
;; Clean up whitespace
|
||||
(use-package ws-butler
|
||||
:ensure t
|
||||
:diminish ws-butler-mode
|
||||
:config
|
||||
(ws-butler-global-mode t)
|
||||
;; Keep whitespace before point when editing
|
||||
(setq ws-butler-keep-whitespace-before-point t))
|
||||
|
||||
;; Rainbow delimiters
|
||||
(use-package rainbow-delimiters)
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
cc-mode
|
||||
text-mode
|
||||
@@ -1,6 +0,0 @@
|
||||
# -*- mode: snippet; require-final-newline: nil -*-
|
||||
# name: A
|
||||
# key: A
|
||||
# binding: direct-keybinding
|
||||
# --
|
||||
ASSERT_EQ($0)
|
||||
@@ -1,5 +0,0 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: ac
|
||||
# key: ac
|
||||
# --
|
||||
* @param[in] alloc Memory allocator to use.
|
||||
@@ -1,5 +0,0 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: alloc
|
||||
# key: alloc
|
||||
# --
|
||||
const xplat::polymorphic_allocator<> alloc;
|
||||
@@ -1,5 +0,0 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: ator
|
||||
# key: ator
|
||||
# --
|
||||
const xplat::polymorphic_allocator<> alloc;
|
||||
@@ -1,5 +0,0 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: be
|
||||
# key: be
|
||||
# --
|
||||
$1.begin(), $1.end()
|
||||
@@ -1,8 +0,0 @@
|
||||
# -*- mode: snippet -*-
|
||||
# contributor: York Zhao <gtdplatform@gmail.com>
|
||||
# name: cerr
|
||||
# key: cerr
|
||||
# --
|
||||
`(progn (save-excursion) (goto-char (point-min)) (unless (re-search-forward
|
||||
"^using\\s-+namespace std;" nil 'no-errer) "std::"))
|
||||
`cerr << $0 << '\n';
|
||||
@@ -1,13 +0,0 @@
|
||||
# -*- mode: snippet; require-final-newline: nil -*-
|
||||
# name: class
|
||||
# key: class
|
||||
# binding: direct-keybinding
|
||||
# --
|
||||
class ${1:Class}
|
||||
{
|
||||
public:
|
||||
$1()
|
||||
: { }
|
||||
|
||||
private:
|
||||
};
|
||||
@@ -1,10 +0,0 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: cmd
|
||||
# key: cmd
|
||||
# --
|
||||
static void ${1:cmd}(base::Cmd& cmd)
|
||||
{
|
||||
$0
|
||||
}
|
||||
|
||||
CMD($1, "$1");
|
||||
@@ -1,8 +0,0 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: constructor
|
||||
# key: ct
|
||||
# --
|
||||
${1:Class}::$1(${2:args}) ${3: : ${4:init}}
|
||||
{
|
||||
$0
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
# -*- mode: snippet; require-final-newline: nil -*-
|
||||
# name: copy
|
||||
# key: copy
|
||||
# binding: direct-keybinding
|
||||
# --
|
||||
* Copyright (C) `(format-time-string "%Y" (current-time))` Timo Bingmann <tb@panthema.net>
|
||||
@@ -1,14 +0,0 @@
|
||||
# -*- mode: snippet; require-final-newline: nil -*-
|
||||
# name: copymove
|
||||
# key: copymove
|
||||
# binding: direct-keybinding
|
||||
# expand-env: ((yas-indent-line 'fixed))
|
||||
# --
|
||||
//! default copy-constructor
|
||||
${1:class}(const $1 &) = default;
|
||||
//! default assignment operator
|
||||
$1 & operator = (const $1 &) = default;
|
||||
//! move-constructor: default
|
||||
$1($1 &&) = default;
|
||||
//! move-assignment operator: default
|
||||
$1 & operator = ($1 &&) = default;
|
||||
@@ -1,8 +0,0 @@
|
||||
# -*- mode: snippet -*-
|
||||
# contributor: York Zhao <gtdplatform@gmail.com>
|
||||
# name: cout
|
||||
# key: cout
|
||||
# --
|
||||
`(progn (save-excursion) (goto-char (point-min)) (unless (re-search-forward
|
||||
"^using\\s-+namespace std;" nil 'no-errer) "std::"))
|
||||
`cout << $0 << '\n';
|
||||
@@ -1,5 +0,0 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: cv
|
||||
# key: cv
|
||||
# --
|
||||
std::cout << "$1 " << $1 << std::endl;
|
||||
@@ -1,5 +0,0 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: d
|
||||
# key: d
|
||||
# --
|
||||
qDebug() <<
|
||||
@@ -1,6 +0,0 @@
|
||||
# -*- mode: snippet; require-final-newline: nil -*-
|
||||
# name: debug
|
||||
# key: debug
|
||||
# binding: direct-keybinding
|
||||
# --
|
||||
static constexpr bool debug = true;
|
||||
@@ -1,6 +0,0 @@
|
||||
# -*- mode: snippet; require-final-newline: nil -*-
|
||||
# name: debugf
|
||||
# key: debugf
|
||||
# binding: direct-keybinding
|
||||
# --
|
||||
static constexpr bool debug = false;
|
||||
@@ -1,7 +0,0 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: doc
|
||||
# key: doc
|
||||
# --
|
||||
/**
|
||||
* @brief $1
|
||||
*/
|
||||
@@ -1,12 +0,0 @@
|
||||
# -*- mode: snippet; require-final-newline: nil -*-
|
||||
# name: dog
|
||||
# key: dog
|
||||
# binding: direct-keybinding
|
||||
# expand-env: ((yas-indent-line 'fixed))
|
||||
# --
|
||||
//! \\name $1
|
||||
//! \\{
|
||||
|
||||
$0
|
||||
|
||||
//! \\}
|
||||
@@ -1,5 +0,0 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: el
|
||||
# key: el
|
||||
# --
|
||||
<< std::endl
|
||||
@@ -1,14 +0,0 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: functor
|
||||
# key: functor
|
||||
# --
|
||||
class ${1:Functor}
|
||||
{
|
||||
public:
|
||||
$1($2) { }
|
||||
|
||||
void operator () () const {
|
||||
}
|
||||
|
||||
private:
|
||||
};
|
||||
@@ -1,5 +0,0 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: hi
|
||||
# key: hi
|
||||
# --
|
||||
/*`(make-string (- 78 (current-column)) ?-)`*/
|
||||
@@ -1,6 +0,0 @@
|
||||
# -*- mode: snippet; require-final-newline: nil -*-
|
||||
# name: i
|
||||
# key: i
|
||||
# binding: direct-keybinding
|
||||
# --
|
||||
`(if (char-equal ?) (preceding-char)) "," "")` m_${1:var}($1)
|
||||
@@ -1,6 +0,0 @@
|
||||
# -*- mode: snippet; require-final-newline: nil -*-
|
||||
# name: lock
|
||||
# key: lock
|
||||
# binding: direct-keybinding
|
||||
# --
|
||||
std::unique_lock<std::mutex> lock$1(mutex$1_);
|
||||
@@ -1,7 +0,0 @@
|
||||
# -*- mode: snippet; require-final-newline: nil -*-
|
||||
# name: mutexlock
|
||||
# key: mutexlock
|
||||
# binding: direct-keybinding
|
||||
# --
|
||||
static std::mutex mutex$1;
|
||||
std::unique_lock<std::mutex> lock$1(mutex$1);
|
||||
@@ -1,17 +0,0 @@
|
||||
# -*- mode: snippet; require-final-newline: nil -*-
|
||||
# name: mysource
|
||||
# key: mysource
|
||||
# binding: direct-keybinding
|
||||
# --
|
||||
/*******************************************************************************
|
||||
* $1/<file>
|
||||
*
|
||||
* $2
|
||||
******************************************************************************/
|
||||
|
||||
namespace $1 {
|
||||
|
||||
|
||||
} // namespace $1
|
||||
|
||||
/******************************************************************************/
|
||||
@@ -1,5 +0,0 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: nl
|
||||
# key: nl
|
||||
# --
|
||||
// NOLINTNEXTLINE($1)
|
||||
@@ -1,10 +0,0 @@
|
||||
# -*- mode: snippet; require-final-newline: nil -*-
|
||||
# name: noncopy
|
||||
# key: noncopy
|
||||
# binding: direct-keybinding
|
||||
# expand-env: ((yas-indent-line 'fixed))
|
||||
# --
|
||||
//! non-copyable: delete copy-constructor
|
||||
${1:class}(const $1 &) = delete;
|
||||
//! non-copyable: delete assignment operator
|
||||
$1 & operator = (const $1 &) = delete;
|
||||
@@ -1,14 +0,0 @@
|
||||
# -*- mode: snippet; require-final-newline: nil -*-
|
||||
# name: noncopymove
|
||||
# key: noncopymove
|
||||
# binding: direct-keybinding
|
||||
# expand-env: ((yas-indent-line 'fixed))
|
||||
# --
|
||||
//! non-copyable: delete copy-constructor
|
||||
${1:class}(const $1 &) = delete;
|
||||
//! non-copyable: delete assignment operator
|
||||
$1 & operator = (const $1 &) = delete;
|
||||
//! move-constructor: default
|
||||
$1($1 &&) noexcept = default;
|
||||
//! move-assignment operator: default
|
||||
$1 & operator = ($1 &&) noexcept = default;
|
||||
@@ -1,10 +0,0 @@
|
||||
# -*- mode: snippet; require-final-newline: nil -*-
|
||||
# name: namespace
|
||||
# key: ns
|
||||
# binding: direct-keybinding
|
||||
# --
|
||||
namespace $1 {
|
||||
|
||||
$0
|
||||
|
||||
} // namespace $1
|
||||
@@ -1,5 +0,0 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: al
|
||||
# key: al
|
||||
# --
|
||||
allocator_type alloc
|
||||
@@ -1,8 +0,0 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: operator>>
|
||||
# key: op>>
|
||||
# --
|
||||
istream& operator>>(istream& s, const ${1:type}& ${2:c})
|
||||
{
|
||||
$0
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: operator<
|
||||
# key: op<
|
||||
# --
|
||||
friend bool operator < (const ${1:type}& a, const $1& b)
|
||||
{
|
||||
return $0;
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: operator<<
|
||||
# key: op<<
|
||||
# --
|
||||
friend std::ostream& operator << (std::ostream& os, const ${1:type}& ${2:x})
|
||||
{
|
||||
return os << $0;
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: os
|
||||
# key: os
|
||||
# --
|
||||
os << " $1=" << x.$1;
|
||||
@@ -1,6 +0,0 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: oso
|
||||
# key: oso
|
||||
# --
|
||||
if (${2:t}.${1:var})
|
||||
os << " $1=" << $2.$1;
|
||||
@@ -1,6 +0,0 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: oss
|
||||
# key: oss
|
||||
# --
|
||||
std::ostringstream oss;
|
||||
oss << $0
|
||||
@@ -1,5 +0,0 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: pe
|
||||
# key: pe
|
||||
# --
|
||||
v.$1 += p.$1;
|
||||
@@ -1,8 +0,0 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: perl
|
||||
# key: perl
|
||||
# --
|
||||
/*[[[perl
|
||||
$0
|
||||
]]]*/
|
||||
//[[[end]]]
|
||||
@@ -1,10 +0,0 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: q
|
||||
# key: q
|
||||
# --
|
||||
db::Query q = cmd.db_.query << "SELECT $1"
|
||||
<< into(...);
|
||||
|
||||
while (q.next())
|
||||
{
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
# -*- mode: snippet; require-final-newline: nil -*-
|
||||
# name: stdrand
|
||||
# key: stdrand
|
||||
# binding: direct-keybinding
|
||||
# --
|
||||
std::default_random_engine ${1:name}(std::random_device { } ())
|
||||
@@ -1,6 +0,0 @@
|
||||
# -*- mode: snippet; require-final-newline: nil -*-
|
||||
# name: stdsleep
|
||||
# key: stdsleep
|
||||
# binding: direct-keybinding
|
||||
# --
|
||||
std::this_thread::sleep_for(std::chrono::seconds($1));
|
||||
@@ -1,5 +0,0 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: sv
|
||||
# key: sv
|
||||
# --
|
||||
std::string_view
|
||||
@@ -1,5 +0,0 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: svlit
|
||||
# key: svlit
|
||||
# --
|
||||
using namespace std::string_view_literals;
|
||||
@@ -1,9 +0,0 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: timestamp
|
||||
# key: timestamp
|
||||
# --
|
||||
//! Time is measured using chrono::steady_clock
|
||||
static double timestamp() {
|
||||
return std::chrono::duration_cast<std::chrono::duration<double> >(
|
||||
std::chrono::steady_clock::now().time_since_epoch()).count();
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: try
|
||||
# key: try
|
||||
# a bit too intrusive now still, not always I want to do this
|
||||
# --
|
||||
try {
|
||||
$0
|
||||
} catch (${1:std::exception& e}) {
|
||||
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: using_ator
|
||||
# key: using
|
||||
# --
|
||||
using allocator_type = xplat::polymorphic_allocator<>;
|
||||
@@ -1,5 +0,0 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: ls
|
||||
# key: ls
|
||||
# --
|
||||
common::allocate_local_shared
|
||||
@@ -1,2 +0,0 @@
|
||||
cc-mode
|
||||
text-mode
|
||||
@@ -1,5 +0,0 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: hr
|
||||
# key: hr
|
||||
# --
|
||||
################################################################################
|
||||
@@ -1,6 +0,0 @@
|
||||
# -*- mode: snippet; require-final-newline: nil -*-
|
||||
# name: c
|
||||
# key: c
|
||||
# binding: direct-keybinding
|
||||
# --
|
||||
/* $1 */
|
||||
@@ -1,7 +0,0 @@
|
||||
# -*- mode: snippet; require-final-newline: nil -*-
|
||||
# name: cc
|
||||
# key: cc
|
||||
# binding: direct-keybinding
|
||||
# --
|
||||
/** $1
|
||||
*/
|
||||
@@ -1,6 +0,0 @@
|
||||
# -*- mode: snippet; require-final-newline: nil -*-
|
||||
# name: comment-spacerline
|
||||
# key: ***
|
||||
# binding: direct-keybinding
|
||||
# --
|
||||
/******************************************************************************/
|
||||
@@ -1,8 +0,0 @@
|
||||
# -*- mode: snippet; require-final-newline: nil -*-
|
||||
# name: for
|
||||
# key: for
|
||||
# binding: direct-keybinding
|
||||
# --
|
||||
for ($1) {
|
||||
$0
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: fori
|
||||
# key: fori
|
||||
# --
|
||||
for (${1:std::size_t} ${2:i} = ${3:0}; $2 ${4:!= size()}; ++$2) {
|
||||
$0
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: guard
|
||||
# key: guard
|
||||
# --
|
||||
#ifndef ${1:NAME}_HEADER
|
||||
#define $1_HEADER
|
||||
|
||||
$0
|
||||
|
||||
#endif // $1_HEADER
|
||||
@@ -1,6 +0,0 @@
|
||||
# -*- mode: snippet; require-final-newline: nil -*-
|
||||
# name: in
|
||||
# key: in
|
||||
# binding: direct-keybinding
|
||||
# --
|
||||
#include <$0>
|
||||
@@ -1,6 +0,0 @@
|
||||
# -*- mode: snippet; require-final-newline: nil -*-
|
||||
# name: inc
|
||||
# key: inc
|
||||
# binding: direct-keybinding
|
||||
# --
|
||||
#include "$0"
|
||||
@@ -1,9 +0,0 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: main
|
||||
# key: main
|
||||
# --
|
||||
int main(${1:int argc, char *argv[]})
|
||||
{
|
||||
$0
|
||||
return 0;
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: packed
|
||||
# key: packed
|
||||
# --
|
||||
__attribute__((__packed__))$0
|
||||
@@ -1,11 +0,0 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: switch
|
||||
# key: case
|
||||
# --
|
||||
switch (${1:ch}) {
|
||||
case ${2:const}:
|
||||
${3:a = b};
|
||||
break;
|
||||
${4:default:
|
||||
${5:action}}
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
text-mode
|
||||
@@ -1,5 +0,0 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: cmake_minimum_required
|
||||
# key: min
|
||||
# --
|
||||
cmake_minimum_required(VERSION ${1:2.6})
|
||||
@@ -1,7 +0,0 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: foreach
|
||||
# key: for
|
||||
# --
|
||||
foreach(${1:item} \${${2:array}})
|
||||
$0
|
||||
endforeach()
|
||||
@@ -1,7 +0,0 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: function
|
||||
# key: fun
|
||||
# --
|
||||
function (${1:name})
|
||||
$0
|
||||
endfunction()
|
||||
@@ -1,6 +0,0 @@
|
||||
# -*- mode: snippet; require-final-newline: nil -*-
|
||||
# name: hr
|
||||
# key: hr
|
||||
# binding: direct-keybinding
|
||||
# --
|
||||
`(make-string (- 80 (current-column)) ?#)`
|
||||
@@ -1,7 +0,0 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: if
|
||||
# key: if
|
||||
# --
|
||||
if(${1:cond})
|
||||
$0
|
||||
endif()
|
||||
@@ -1,9 +0,0 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: ifelse
|
||||
# key: if
|
||||
# --
|
||||
if(${1:cond})
|
||||
$2
|
||||
else(${3:cond})
|
||||
$0
|
||||
endif()
|
||||
@@ -1,5 +0,0 @@
|
||||
# type: command
|
||||
# key: inc
|
||||
# name: include
|
||||
# --
|
||||
include ($0)
|
||||
@@ -1,7 +0,0 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: macro
|
||||
# key: macro
|
||||
# --
|
||||
macro(${1:name}${2: args})
|
||||
|
||||
endmacro()
|
||||
@@ -1,5 +0,0 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: message
|
||||
# key: msg
|
||||
# --
|
||||
message(${1:STATUS }"$0")
|
||||
@@ -1,5 +0,0 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: option
|
||||
# key: opt
|
||||
# --
|
||||
option (${1:OPT} "${2:docstring}" ${3:value})
|
||||
@@ -1,5 +0,0 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: project
|
||||
# key: proj
|
||||
# --
|
||||
project ($0)
|
||||
@@ -1,5 +0,0 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: set
|
||||
# key: set
|
||||
# --
|
||||
set(${1:var} ${2:value})
|
||||
@@ -1 +0,0 @@
|
||||
text-mode
|
||||
@@ -1,21 +0,0 @@
|
||||
# -*- mode: snippet; require-final-newline: nil -*-
|
||||
# name: package
|
||||
# key: package
|
||||
# binding: direct-keybinding
|
||||
# --
|
||||
#!/usr/bin/perl -w
|
||||
|
||||
package ${1:package};
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use diagnostics;
|
||||
use utf8;
|
||||
|
||||
use Exporter;
|
||||
|
||||
our @ISA = qw(Exporter);
|
||||
our @EXPORT = qw();
|
||||
our @EXPORT_OK = qw();
|
||||
|
||||
1;
|
||||
@@ -1,8 +0,0 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: perl
|
||||
# key: perl
|
||||
# --
|
||||
#!/usr/bin/env perl
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
@@ -1,6 +0,0 @@
|
||||
# -*- mode: snippet; require-final-newline: nil -*-
|
||||
# name: doc
|
||||
# key: doc
|
||||
# binding: direct-keybinding
|
||||
# --
|
||||
/* $1 */
|
||||
@@ -1,5 +0,0 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: hr
|
||||
# key: hr
|
||||
# --
|
||||
################################################################################
|
||||
@@ -1,5 +0,0 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: hr
|
||||
# key: hr
|
||||
# --
|
||||
################################################################################
|
||||
@@ -1,2 +0,0 @@
|
||||
cc-mode
|
||||
text-mode
|
||||
@@ -1,5 +0,0 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: hr
|
||||
# key: hr
|
||||
# --
|
||||
/*`(make-string (- 78 (current-column)) ?*)`*/
|
||||
@@ -1 +0,0 @@
|
||||
text-mode
|
||||
@@ -1,8 +0,0 @@
|
||||
# -*- mode: snippet; require-final-newline: nil -*-
|
||||
# name: begin
|
||||
# key: begin
|
||||
# binding: direct-keybinding
|
||||
# --
|
||||
\begin{${1:environment}}
|
||||
$0
|
||||
\end{$1}
|
||||
@@ -1,12 +0,0 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: cols
|
||||
# key: cols
|
||||
# --
|
||||
\begin{columns}
|
||||
\begin{column}{${1:.5}\linewidth}
|
||||
column 1
|
||||
\end{column}
|
||||
\begin{column}{${2:.5}\linewidth}
|
||||
column 2
|
||||
\end{column}
|
||||
\end{columns}
|
||||
@@ -1,8 +0,0 @@
|
||||
# -*- mode: snippet; require-final-newline: nil -*-
|
||||
# name: enumerate
|
||||
# key: enumerate
|
||||
# binding: direct-keybinding
|
||||
# --
|
||||
\begin{enumerate}
|
||||
\item $0
|
||||
\end{enumerate}
|
||||
@@ -1,9 +0,0 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: figure
|
||||
# key: figure
|
||||
# --
|
||||
\begin{figure}[ht]
|
||||
\centering
|
||||
\includegraphics[${1:options}]{figures/${2:path.pdf}}
|
||||
\caption{\label{fig:${3:label}} $0}
|
||||
\end{figure}
|
||||
@@ -1,10 +0,0 @@
|
||||
# -*- mode: snippet; require-final-newline: nil -*-
|
||||
# name: frame
|
||||
# key: frame
|
||||
# binding: direct-keybinding
|
||||
# --
|
||||
% ------------------------------------------------------------------------------
|
||||
|
||||
\begin{frame}{${1:title}}
|
||||
|
||||
\end{frame}
|
||||
@@ -1,5 +0,0 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: ho
|
||||
# key: ho
|
||||
# --
|
||||
% ---[ $1 ]-------------------------------------------------
|
||||
@@ -1,6 +0,0 @@
|
||||
# -*- mode: snippet; require-final-newline: nil -*-
|
||||
# name: hr
|
||||
# key: hr
|
||||
# binding: direct-keybinding
|
||||
# --
|
||||
% `(make-string (- 80 (current-column)) ?-)`
|
||||
@@ -1,6 +0,0 @@
|
||||
# -*- mode: snippet; require-final-newline: nil -*-
|
||||
# name: hrr
|
||||
# key: hrr
|
||||
# binding: direct-keybinding
|
||||
# --
|
||||
% ==============================================================================
|
||||
@@ -1,9 +0,0 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: hrx
|
||||
# key: hrx
|
||||
# --
|
||||
% %
|
||||
%% %%
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%% %%
|
||||
% %
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user