├── .gitignore ├── README.md ├── dotfiles ├── awesome │ └── rc.lua ├── dot.Xdefaults ├── dot.Xmodmap ├── dot.asdfrc ├── dot.bazaar │ ├── bazaar.conf │ └── ignore ├── dot.bundle │ └── config ├── dot.config │ ├── ciw │ │ └── list │ ├── git │ │ ├── attributes │ │ ├── config │ │ ├── delta.config │ │ └── ignore │ ├── mintty │ │ └── config │ ├── mise │ │ └── config.toml │ ├── surfingkeys │ │ ├── default.js │ │ └── surfingkeys.js │ ├── tmux │ │ ├── tmux.conf │ │ └── tmux.mac.conf │ └── wtrans │ │ └── wtrans.yaml ├── dot.ctags ├── dot.hgignore ├── dot.hgrc ├── dot.inputrc ├── dot.irbrc ├── dot.mlterm │ ├── color │ ├── font │ └── main ├── dot.npmrc ├── dot.pyrc ├── dot.screenrc ├── dot.vim │ ├── autoload │ │ ├── vimrc.vim │ │ └── vimrc │ │ │ └── ddu.vim │ ├── dein.vim │ ├── dict │ │ ├── migemo │ │ │ ├── han2zen.dat │ │ │ ├── hira2kata.dat │ │ │ ├── migemo-dict │ │ │ └── roma2hira.dat │ │ └── skk │ │ │ ├── SKK-JISYO.euc-jp.L │ │ │ └── SKK-JISYO.utf-8.L │ ├── pack │ │ └── personal │ │ │ └── start │ │ │ └── default │ │ │ ├── after │ │ │ ├── ftplugin │ │ │ │ ├── ant.vim │ │ │ │ ├── c.vim │ │ │ │ ├── calendar.vim │ │ │ │ ├── clojure.vim │ │ │ │ ├── coffee.vim │ │ │ │ ├── cs.vim │ │ │ │ ├── css.vim │ │ │ │ ├── csv.vim │ │ │ │ ├── diff.vim │ │ │ │ ├── dockerfile.vim │ │ │ │ ├── dosbatch.vim │ │ │ │ ├── exrename.vim │ │ │ │ ├── gitcommit.vim │ │ │ │ ├── gitconfig.vim │ │ │ │ ├── go.vim │ │ │ │ ├── haskell.vim │ │ │ │ ├── help.vim │ │ │ │ ├── html.vim │ │ │ │ ├── int-clj.vim │ │ │ │ ├── int-termtter.vim │ │ │ │ ├── irb.vim │ │ │ │ ├── java.vim │ │ │ │ ├── javaclass.vim │ │ │ │ ├── javascript.vim │ │ │ │ ├── jproperties.vim │ │ │ │ ├── json.vim │ │ │ │ ├── kotlin.vim │ │ │ │ ├── ku.vim │ │ │ │ ├── lhaskell.vim │ │ │ │ ├── lua.vim │ │ │ │ ├── man.vim │ │ │ │ ├── markdown.vim │ │ │ │ ├── mysql.vim │ │ │ │ ├── neosnippet.vim │ │ │ │ ├── notebook.vim │ │ │ │ ├── perl.vim │ │ │ │ ├── php.vim │ │ │ │ ├── python.vim │ │ │ │ ├── qf.vim │ │ │ │ ├── ref.vim │ │ │ │ ├── ruby.vim │ │ │ │ ├── sablecc.vim │ │ │ │ ├── scala.vim │ │ │ │ ├── scheme.vim │ │ │ │ ├── scss.vim │ │ │ │ ├── sh.vim │ │ │ │ ├── showtime.vim │ │ │ │ ├── svn.vim │ │ │ │ ├── text.vim │ │ │ │ ├── typescript.vim │ │ │ │ ├── unite.vim │ │ │ │ ├── vim.vim │ │ │ │ ├── vimfiler.vim │ │ │ │ ├── vimgolf.vim │ │ │ │ ├── vimshell.vim │ │ │ │ ├── xml.vim │ │ │ │ ├── xxd.vim │ │ │ │ ├── yaml.vim │ │ │ │ └── zsh.vim │ │ │ ├── plugin │ │ │ │ └── unmap.vim │ │ │ └── syntax │ │ │ │ ├── ant.vim │ │ │ │ ├── cs.vim │ │ │ │ ├── help.vim │ │ │ │ ├── json.vim │ │ │ │ ├── markdown.vim │ │ │ │ ├── rst.vim │ │ │ │ └── vim.vim │ │ │ └── ftdetect │ │ │ └── filetype.vim │ ├── snippets │ │ ├── _.snip │ │ ├── ant.snip │ │ ├── c.snip │ │ ├── clojure.snip │ │ ├── cpp.snip │ │ ├── haskell.snip │ │ ├── help.snip │ │ ├── java.snip │ │ ├── javascript.snip │ │ ├── kotlin.snip │ │ ├── lua.snip │ │ ├── mysql.snip │ │ ├── ruby.snip │ │ ├── rust.snip │ │ ├── scala.snip │ │ ├── vim.snip │ │ └── zsh.snip │ ├── template │ │ ├── Gemfile │ │ ├── Gemfile.local │ │ ├── LICENSE.txt │ │ ├── compiler │ │ │ └── template.vim │ │ ├── custom │ │ │ └── after │ │ │ │ └── ftplugin │ │ │ │ └── template.vim │ │ ├── doc │ │ │ ├── template.jax │ │ │ ├── template.txt │ │ │ └── vital │ │ │ │ └── template.txt │ │ ├── filetype │ │ │ ├── perl │ │ │ └── sh │ │ ├── ftplugin │ │ │ └── template.vim │ │ ├── gulpfile.coffee │ │ ├── plugin │ │ │ └── template.vim │ │ ├── syntax │ │ │ └── template.vim │ │ ├── template.bat │ │ ├── template.cs │ │ ├── template.java │ │ ├── template.partial.cs │ │ ├── template.php │ │ ├── template.pm │ │ ├── template.vim.bash │ │ ├── template.xhtml │ │ ├── templateException.java │ │ ├── templateTest.php │ │ └── test │ │ │ └── template.themisrc │ ├── vimrc │ └── vimshrc ├── dot.vrapperrc ├── dot.w3m │ └── keymap ├── dot.xinitrc ├── dot.xmonad │ ├── dzenGmailNotify.py │ ├── genemailnotification.sh │ ├── startup │ ├── status │ └── xmonad.hs ├── dot.zsh │ ├── mac.zsh │ ├── p10k.zsh │ ├── scripts │ │ ├── cargo.zsh │ │ ├── direnv.zsh │ │ ├── docker.zsh │ │ ├── fzf.zsh │ │ ├── go.zsh │ │ ├── haskell.zsh │ │ ├── kvm.zsh │ │ ├── man.zsh │ │ ├── mise.zsh │ │ ├── node.zsh │ │ ├── ruby.zsh │ │ ├── rust.zsh │ │ ├── vcs.zsh │ │ └── vim.zsh │ ├── system │ └── tmux └── dot.zshrc ├── firefox ├── TUprefs.txt ├── firegestures.sqlite └── tabgroups-prefs.json ├── mac ├── Library │ └── LaunchAgents │ │ └── lemonade.server.plist ├── brew.sh ├── karabiner │ ├── import.sh │ ├── private.xml │ └── save.sh └── setup.sh ├── rbenv └── default-gems ├── setup.bat ├── setup.d ├── 05dotconfig.sh └── 10link.sh └── setup.sh /.gitignore: -------------------------------------------------------------------------------- 1 | /dotfiles/dot.bundle/cache/ 2 | /dotfiles/dot.config/git/*.local 3 | /dotfiles/dot.config/vim/local.dein.vim 4 | /dotfiles/dot.config/vim/local.pre.vim 5 | /dotfiles/dot.config/vim/local.vim 6 | /dotfiles/dot.w3m/history 7 | /dotfiles/dot.w3m/cookie 8 | /dotfiles/dot.vim/pack/* 9 | !/dotfiles/dot.vim/pack/personal/ 10 | 11 | # This is automatically generated 12 | dotfiles/dot.zsh/functions/Completion/_mise 13 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | My configuration files 2 | ====================== 3 | 4 | This repository may contain other person's scripts. Please inform me if there is any problem by email(thinca@gmail.com), or [GitHub Issues](https://github.com/thinca/config/issues), and so on. 5 | -------------------------------------------------------------------------------- /dotfiles/awesome/rc.lua: -------------------------------------------------------------------------------- 1 | -- Standard awesome library 2 | require("awful") 3 | require("awful.autofocus") 4 | require("awful.rules") 5 | -- Theme handling library 6 | require("beautiful") 7 | -- Notification library 8 | require("naughty") 9 | 10 | -- http://git.sysphere.org/vicious 11 | require("vicious") 12 | 13 | -- {{{ Variable definitions 14 | -- Themes define colours, icons, and wallpapers 15 | beautiful.init("/usr/share/awesome/themes/zenburn/theme.lua") 16 | 17 | -- This is used later as the default terminal and editor to run. 18 | terminal = "mlterm" 19 | editor = os.getenv("EDITOR") or "vim" 20 | editor_cmd = terminal .. " -e " .. editor 21 | 22 | -- Default modkey. 23 | -- Usually, Mod4 is the key with a logo between Control and Alt. 24 | -- If you do not like this or do not have such a key, 25 | -- I suggest you to remap Mod4 to another key using xmodmap or other tools. 26 | -- However, you can use another modifier like Mod1, but it may interact with others. 27 | modkey = "Mod4" 28 | submodkey = "Mod3" 29 | 30 | -- Utils. 31 | function feedkey(key) 32 | return function () 33 | c = awful.client.focus.history.get(0, 0) 34 | awful.util.spawn("xdotool key --window " .. c.window .. " " .. key) 35 | end 36 | end 37 | 38 | 39 | -- Table of layouts to cover with awful.layout.inc, order matters. 40 | layouts = 41 | { 42 | awful.layout.suit.tile, 43 | awful.layout.suit.tile.left, 44 | awful.layout.suit.tile.bottom, 45 | awful.layout.suit.tile.top, 46 | awful.layout.suit.fair, 47 | awful.layout.suit.fair.horizontal, 48 | awful.layout.suit.spiral, 49 | awful.layout.suit.spiral.dwindle, 50 | awful.layout.suit.max, 51 | awful.layout.suit.max.fullscreen, 52 | awful.layout.suit.magnifier, 53 | awful.layout.suit.floating, 54 | } 55 | -- }}} 56 | 57 | -- {{{ Tags 58 | -- Define a tag table which hold all screen tags. 59 | tags = {} 60 | for s = 1, screen.count() do 61 | -- Each screen has its own tag table. 62 | tags[s] = awful.tag({ 1, 2, 3, 4, 5, 6, 7, 8, 9 }, s, layouts[1]) 63 | end 64 | -- }}} 65 | 66 | -- {{{ Menu 67 | -- Create a laucher widget and a main menu 68 | myawesomemenu = { 69 | { "manual", terminal .. " -e man awesome" }, 70 | { "edit config", editor_cmd .. " " .. awful.util.getdir("config") .. "/rc.lua" }, 71 | { "restart", awesome.restart }, 72 | { "quit", awesome.quit } 73 | } 74 | 75 | mymainmenu = awful.menu({ items = { { "awesome", myawesomemenu, beautiful.awesome_icon }, 76 | { "open terminal", terminal } 77 | } 78 | }) 79 | 80 | mylauncher = awful.widget.launcher({ image = image(beautiful.awesome_icon), 81 | menu = mymainmenu }) 82 | -- }}} 83 | 84 | -- {{{ Wibox 85 | -- Create a textclock widget 86 | mytextclock = awful.widget.textclock({ align = "right" }) 87 | 88 | -- Create a systray 89 | mysystray = widget({ type = "systray" }) 90 | 91 | -- Battery 92 | mybattery = widget({ type = "textbox" }) 93 | --[[ 94 | mybattery = awful.widget.progressbar() 95 | mybattery:set_width(8) 96 | mybattery:set_height(10) 97 | mybattery:set_vertical(true) 98 | mybattery:set_background_color("#494B4F") 99 | mybattery:set_border_color(nil) 100 | mybattery:set_color("#AECF96") 101 | mybattery:set_gradient_colors({ "#AECF96", "#88A175", "#FF5656" }) 102 | --]] 103 | vicious.register(mybattery, vicious.widgets.bat, "$1$2% $3", 61, "BAT0") 104 | 105 | -- Create a wibox for each screen and add it 106 | mywibox = {} 107 | mypromptbox = {} 108 | mylayoutbox = {} 109 | mytaglist = {} 110 | mytaglist.buttons = awful.util.table.join( 111 | awful.button({ }, 1, awful.tag.viewonly), 112 | awful.button({ modkey }, 1, awful.client.movetotag), 113 | awful.button({ }, 3, awful.tag.viewtoggle), 114 | awful.button({ modkey }, 3, awful.client.toggletag), 115 | awful.button({ }, 4, awful.tag.viewnext), 116 | awful.button({ }, 5, awful.tag.viewprev) 117 | ) 118 | mytasklist = {} 119 | mytasklist.buttons = awful.util.table.join( 120 | awful.button({ }, 1, function (c) 121 | if not c:isvisible() then 122 | awful.tag.viewonly(c:tags()[1]) 123 | end 124 | client.focus = c 125 | c:raise() 126 | end), 127 | awful.button({ }, 3, function () 128 | if instance then 129 | instance:hide() 130 | instance = nil 131 | else 132 | instance = awful.menu.clients({ width=250 }) 133 | end 134 | end), 135 | awful.button({ }, 4, function () 136 | awful.client.focus.byidx(1) 137 | if client.focus then client.focus:raise() end 138 | end), 139 | awful.button({ }, 5, function () 140 | awful.client.focus.byidx(-1) 141 | if client.focus then client.focus:raise() end 142 | end)) 143 | 144 | 145 | 146 | for s = 1, screen.count() do 147 | -- Create a promptbox for each screen 148 | mypromptbox[s] = awful.widget.prompt({ layout = awful.widget.layout.horizontal.leftright }) 149 | -- Create an imagebox widget which will contains an icon indicating which layout we're using. 150 | -- We need one layoutbox per screen. 151 | mylayoutbox[s] = awful.widget.layoutbox(s) 152 | mylayoutbox[s]:buttons(awful.util.table.join( 153 | awful.button({ }, 1, function () awful.layout.inc(layouts, 1) end), 154 | awful.button({ }, 3, function () awful.layout.inc(layouts, -1) end), 155 | awful.button({ }, 4, function () awful.layout.inc(layouts, 1) end), 156 | awful.button({ }, 5, function () awful.layout.inc(layouts, -1) end))) 157 | -- Create a taglist widget 158 | mytaglist[s] = awful.widget.taglist(s, awful.widget.taglist.label.all, mytaglist.buttons) 159 | 160 | -- Create a tasklist widget 161 | mytasklist[s] = awful.widget.tasklist(function(c) 162 | return awful.widget.tasklist.label.currenttags(c, s) 163 | end, mytasklist.buttons) 164 | 165 | -- Create the wibox 166 | mywibox[s] = awful.wibox({ position = "top", screen = s }) 167 | -- Add widgets to the wibox - order matters 168 | mywibox[s].widgets = { 169 | { 170 | mylauncher, 171 | mytaglist[s], 172 | mypromptbox[s], 173 | layout = awful.widget.layout.horizontal.leftright 174 | }, 175 | mylayoutbox[s], 176 | mybattery, 177 | mytextclock, 178 | s == 1 and mysystray or nil, 179 | mytasklist[s], 180 | layout = awful.widget.layout.horizontal.rightleft 181 | } 182 | end 183 | -- }}} 184 | 185 | -- {{{ Mouse bindings 186 | root.buttons(awful.util.table.join( 187 | awful.button({ }, 3, function () mymainmenu:toggle() end), 188 | awful.button({ }, 4, awful.tag.viewnext), 189 | awful.button({ }, 5, awful.tag.viewprev) 190 | )) 191 | -- }}} 192 | 193 | -- {{{ Key bindings 194 | globalkeys = awful.util.table.join( 195 | awful.key({ modkey, }, "Left", awful.tag.viewprev ), 196 | awful.key({ modkey, }, "Right", awful.tag.viewnext ), 197 | awful.key({ modkey, }, "Escape", awful.tag.history.restore), 198 | 199 | awful.key({ modkey, }, "j", 200 | function () 201 | awful.client.focus.byidx( 1) 202 | if client.focus then client.focus:raise() end 203 | end), 204 | awful.key({ modkey, }, "k", 205 | function () 206 | awful.client.focus.byidx(-1) 207 | if client.focus then client.focus:raise() end 208 | end), 209 | awful.key({ modkey, }, "w", function () mymainmenu:show({keygrabber=true}) end), 210 | 211 | -- Layout manipulation 212 | awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end), 213 | awful.key({ modkey, "Shift" }, "k", function () awful.client.swap.byidx( -1) end), 214 | awful.key({ modkey, "Control" }, "j", function () awful.screen.focus_relative( 1) end), 215 | awful.key({ modkey, "Control" }, "k", function () awful.screen.focus_relative(-1) end), 216 | awful.key({ modkey, }, "u", awful.client.urgent.jumpto), 217 | awful.key({ modkey, }, "Tab", 218 | function () 219 | awful.client.focus.history.previous() 220 | if client.focus then 221 | client.focus:raise() 222 | end 223 | end), 224 | 225 | -- Standard program 226 | awful.key({ modkey, }, "Return", function () awful.util.spawn(terminal) end), 227 | awful.key({ modkey, "Control" }, "r", awesome.restart), 228 | awful.key({ modkey, "Shift" }, "q", awesome.quit), 229 | 230 | awful.key({ modkey, }, "l", function () awful.tag.incmwfact( 0.05) end), 231 | awful.key({ modkey, }, "h", function () awful.tag.incmwfact(-0.05) end), 232 | awful.key({ modkey, "Shift" }, "h", function () awful.tag.incnmaster( 1) end), 233 | awful.key({ modkey, "Shift" }, "l", function () awful.tag.incnmaster(-1) end), 234 | awful.key({ modkey, "Control" }, "h", function () awful.tag.incncol( 1) end), 235 | awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1) end), 236 | awful.key({ modkey, }, "space", function () awful.layout.inc(layouts, 1) end), 237 | awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(layouts, -1) end), 238 | 239 | -- Prompt 240 | awful.key({ modkey }, "r", function () mypromptbox[mouse.screen]:run() end), 241 | 242 | awful.key({ modkey }, "x", 243 | function () 244 | awful.prompt.run({ prompt = "Run Lua code: " }, 245 | mypromptbox[mouse.screen].widget, 246 | awful.util.eval, nil, 247 | awful.util.getdir("cache") .. "/history_eval") 248 | end), 249 | 250 | awful.key({ submodkey, }, "p", awful.tag.viewprev), 251 | awful.key({ submodkey, }, "n", awful.tag.viewnext), 252 | awful.key({ submodkey, }, "h", feedkey("Left")), 253 | awful.key({ submodkey, }, "j", feedkey("Down")), 254 | awful.key({ submodkey, }, "k", feedkey("Up")), 255 | awful.key({ submodkey, }, "l", feedkey("Right")) 256 | ) 257 | 258 | clientkeys = awful.util.table.join( 259 | awful.key({ modkey, }, "f", function (c) c.fullscreen = not c.fullscreen end), 260 | awful.key({ modkey, "Shift" }, "c", function (c) c:kill() end), 261 | awful.key({ modkey, "Control" }, "space", awful.client.floating.toggle ), 262 | awful.key({ modkey, "Control" }, "Return", function (c) c:swap(awful.client.getmaster()) end), 263 | awful.key({ modkey, }, "o", awful.client.movetoscreen ), 264 | awful.key({ modkey, "Shift" }, "r", function (c) c:redraw() end), 265 | awful.key({ modkey, }, "t", function (c) c.ontop = not c.ontop end), 266 | awful.key({ modkey, }, "n", function (c) c.minimized = not c.minimized end), 267 | awful.key({ modkey, }, "m", 268 | function (c) 269 | c.maximized_horizontal = not c.maximized_horizontal 270 | c.maximized_vertical = not c.maximized_vertical 271 | end) 272 | ) 273 | 274 | -- Compute the maximum number of digit we need, limited to 9 275 | keynumber = 0 276 | for s = 1, screen.count() do 277 | keynumber = math.min(9, math.max(#tags[s], keynumber)); 278 | end 279 | 280 | -- Bind all key numbers to tags. 281 | -- Be careful: we use keycodes to make it works on any keyboard layout. 282 | -- This should map on the top row of your keyboard, usually 1 to 9. 283 | for i = 1, keynumber do 284 | globalkeys = awful.util.table.join(globalkeys, 285 | awful.key({ modkey }, "#" .. i + 9, 286 | function () 287 | local screen = mouse.screen 288 | if tags[screen][i] then 289 | awful.tag.viewonly(tags[screen][i]) 290 | end 291 | end), 292 | awful.key({ modkey, "Control" }, "#" .. i + 9, 293 | function () 294 | local screen = mouse.screen 295 | if tags[screen][i] then 296 | awful.tag.viewtoggle(tags[screen][i]) 297 | end 298 | end), 299 | awful.key({ modkey, "Shift" }, "#" .. i + 9, 300 | function () 301 | if client.focus and tags[client.focus.screen][i] then 302 | awful.client.movetotag(tags[client.focus.screen][i]) 303 | end 304 | end), 305 | awful.key({ modkey, "Control", "Shift" }, "#" .. i + 9, 306 | function () 307 | if client.focus and tags[client.focus.screen][i] then 308 | awful.client.toggletag(tags[client.focus.screen][i]) 309 | end 310 | end)) 311 | end 312 | 313 | clientbuttons = awful.util.table.join( 314 | awful.button({ }, 1, function (c) client.focus = c; c:raise() end), 315 | awful.button({ modkey }, 1, awful.mouse.client.move), 316 | awful.button({ modkey }, 3, awful.mouse.client.resize)) 317 | 318 | -- Set keys 319 | root.keys(globalkeys) 320 | -- }}} 321 | 322 | -- {{{ Rules 323 | awful.rules.rules = { 324 | -- All clients will match this rule. 325 | { rule = { }, 326 | properties = { border_width = beautiful.border_width, 327 | border_color = beautiful.border_normal, 328 | focus = true, 329 | keys = clientkeys, 330 | buttons = clientbuttons } }, 331 | { rule = { class = "MPlayer" }, 332 | properties = { floating = true } }, 333 | { rule = { class = "pinentry" }, 334 | properties = { floating = true } }, 335 | { rule = { class = "gimp" }, 336 | properties = { floating = true } }, 337 | -- Set Firefox to always map on tags number 2 of screen 1. 338 | { rule = { class = "Firefox" }, 339 | properties = { tag = tags[1][2] } }, 340 | { rule = { class = "GVim" }, 341 | properties = { tag = tags[1][3] } }, 342 | } 343 | -- }}} 344 | 345 | -- {{{ Signals 346 | -- Signal function to execute when a new client appears. 347 | client.add_signal("manage", function (c, startup) 348 | -- Add a titlebar 349 | -- awful.titlebar.add(c, { modkey = modkey }) 350 | 351 | -- Enable sloppy focus 352 | c:add_signal("mouse::enter", function(c) 353 | if awful.layout.get(c.screen) ~= awful.layout.suit.magnifier 354 | and awful.client.focus.filter(c) then 355 | client.focus = c 356 | end 357 | end) 358 | 359 | if not startup then 360 | -- Set the windows at the slave, 361 | -- i.e. put it at the end of others instead of setting it master. 362 | -- awful.client.setslave(c) 363 | 364 | -- Put windows in a smart way, only if they does not set an initial position. 365 | if not c.size_hints.user_position and not c.size_hints.program_position then 366 | awful.placement.no_overlap(c) 367 | awful.placement.no_offscreen(c) 368 | end 369 | end 370 | end) 371 | 372 | client.add_signal("focus", function(c) c.border_color = beautiful.border_focus end) 373 | client.add_signal("unfocus", function(c) c.border_color = beautiful.border_normal end) 374 | -- }}} 375 | 376 | 377 | os.execute(terminal .. '&') 378 | 379 | -- vim: path=/usr/share/awesome/lib expandtab 380 | -------------------------------------------------------------------------------- /dotfiles/dot.Xdefaults: -------------------------------------------------------------------------------- 1 | urxvt*saveLines: 20000 2 | urxvt*foreground: snow 3 | urxvt*background: black 4 | urxvt*font: xft:M+2M+IPAG:size=12:antialias=true 5 | urxvt*boldFont: xft:M+2M+IPAG:size=12:antialias=true 6 | -------------------------------------------------------------------------------- /dotfiles/dot.Xmodmap: -------------------------------------------------------------------------------- 1 | add Mod3 = Muhenkan 2 | 3 | ! Caps_Lock -> Control_L 4 | !remove Lock = Caps_Lock 5 | !add Control = Caps_Lock 6 | !keycode 66 = Control_L Control_L 7 | -------------------------------------------------------------------------------- /dotfiles/dot.asdfrc: -------------------------------------------------------------------------------- 1 | legacy_version_file = yes 2 | -------------------------------------------------------------------------------- /dotfiles/dot.bazaar/bazaar.conf: -------------------------------------------------------------------------------- 1 | [DEFAULT] 2 | email = thinca 3 | launchpad_username = thinca 4 | mail_client = default 5 | external_merge = C:/Program Files/WinMerge/WinMergeU.exe 6 | change_editor = gvim -d -f @new_path @old_path 7 | 8 | [ALIASES] 9 | b = branch 10 | d = diff 11 | h = help 12 | l = log 13 | lp = log -p 14 | s = log -p -r -1 15 | i = info 16 | m = merge 17 | ir = init-repo --no-trees . 18 | ci = commit --show-diff 19 | co = checkout 20 | sw = switch 21 | unc = uncommit 22 | gene = log --log-format=custom -n0 23 | recent = log --log-format=custom -n0 -l10 24 | 25 | sh = shelve --all 26 | sl = shelve --list 27 | she = shelve 28 | sp = unshelve 29 | ss = unshelve --preview 30 | 31 | cb = colo-branches 32 | -------------------------------------------------------------------------------- /dotfiles/dot.bazaar/ignore: -------------------------------------------------------------------------------- 1 | *.a 2 | *.o 3 | *.obj 4 | *.py[co] 5 | *.so 6 | *.sw[nop] 7 | *~ 8 | .* 9 | [#]*# 10 | tags 11 | tags-* 12 | GPATH 13 | GRTAGS 14 | GTAGS 15 | -------------------------------------------------------------------------------- /dotfiles/dot.bundle/config: -------------------------------------------------------------------------------- 1 | --- 2 | BUNDLE_PATH: "vendor/bundle" 3 | BUNDLE_BIN: ".bundle/bin" 4 | -------------------------------------------------------------------------------- /dotfiles/dot.config/ciw/list: -------------------------------------------------------------------------------- 1 | cargo:bat 2 | cargo:exa 3 | cargo:fd-find 4 | cargo:git-delta 5 | cargo:procs 6 | cargo:ripgrep 7 | cargo:wasm-pack 8 | cargo:cargo-generate 9 | cargo:typos-cli 10 | go:github.com/client9/misspell/cmd/misspell 11 | go:github.com/junegunn/fzf 12 | go:github.com/lemonade-command/lemonade 13 | go:github.com/mattn/jvgrep/v5 14 | go:github.com/rhysd/actionlint/cmd/actionlint 15 | npm:fixpack 16 | npm:wtrans 17 | npm:npm-check-updates 18 | npm:yarn 19 | npm:npm 20 | npm:sql-formatter 21 | -------------------------------------------------------------------------------- /dotfiles/dot.config/git/attributes: -------------------------------------------------------------------------------- 1 | *.json diff=json 2 | 3 | # vim: ft=gitattributes 4 | -------------------------------------------------------------------------------- /dotfiles/dot.config/git/config: -------------------------------------------------------------------------------- 1 | [core] 2 | autocrlf = false 3 | quotepath = false 4 | pager = (type delta &>/dev/null && delta || (type diff-highlight &>/dev/null && diff-highlight || cat) | less) 5 | [user] 6 | name = thinca 7 | email = thinca@gmail.com 8 | [github] 9 | user = thinca 10 | [color] 11 | ui = auto 12 | [pull] 13 | rebase = true 14 | [push] 15 | default = current 16 | followTags = true 17 | [fetch] 18 | prune = true 19 | [remote] 20 | pushDefault = origin 21 | [rebase] 22 | autoStash = true 23 | autoSquash = true 24 | instructionFormat = [%ai] %an: %s 25 | [diff] 26 | algorithm = histogram 27 | compactionHeuristic = true 28 | colorMoved = dimmed-zebra 29 | colorMovedWS = allow-indentation-change 30 | tool = vimdiff 31 | [difftool] 32 | prompt = false 33 | [grep] 34 | lineNumber = true 35 | [commit] 36 | verbose = true 37 | [interactive] 38 | diffFilter = (type diff-highlight &>/dev/null && diff-highlight || cat) 39 | [alias] 40 | h = help 41 | a = add --update 42 | aa = add -A 43 | cl = clone 44 | b = branch 45 | ba = branch -a 46 | br = branch -r 47 | reword = commit --amend 48 | ci = commit 49 | cia = commit -a 50 | cim = commit --amend -C HEAD 51 | cin = !git commit --amend --all -C HEAD \"--date=$(date --rfc-2822)\" 52 | tm = "!f() { \ 53 | export GIT_COMMITTER_DATE=\"$(date --date=\"$(git log -1 --format=%aD HEAD) ${1:-0} minutes ago\" --rfc-2822)\"; \ 54 | git -c user.email=\"$(git log -1 --format=%ae HEAD)\" -c user.name=\"$(git log -1 --format=%an HEAD)\" commit --amend -C HEAD --date=\"${GIT_COMMITTER_DATE}\"; \ 55 | }; f" 56 | rbtm = "!f() { \ 57 | git -c core.editor=true rebase ${2:-master} -i --exec \"git tm ${1:-0}\"; \ 58 | }; f" 59 | rbd = rebase --committer-date-is-author-date 60 | rbn = rebase --ignore-date 61 | select-commit = "!f() { \ 62 | git log --oneline ${1} | \ 63 | fzf --preview='git show --color {1}' | \ 64 | cut -b 1-7; \ 65 | }; f" 66 | fixcommit = "!f() { \ 67 | git commit --fixup=\"$(\ 68 | git select-commit \"${1:-$(git base-commit)}..HEAD\"\ 69 | )\"; \ 70 | }; f" 71 | fixup = "!f() { \ 72 | git -c core.editor=true rebase --rebase-merges --interactive --autosquash ${1:-$(git base-commit)}; \ 73 | }; f" 74 | fix = "!f() { \ 75 | git fixcommit ${1} && \ 76 | git fixup ${1}; \ 77 | }; f" 78 | sw = checkout 79 | co = checkout 80 | cob = "!f() { \ 81 | b=$(git current-branch) && \ 82 | git checkout -b \"${1}\" && \ 83 | git set-base-branch \"${b}\"; \ 84 | }; f" 85 | topic = !git checkout "$(git current-remote)/master" -b 86 | d = diff HEAD 87 | di = diff 88 | dl = diff HEAD^ 89 | ds = diff --cached 90 | f = fetch 91 | r = remote 92 | l = log 93 | lp = log -p 94 | l1 = log --pretty=oneline 95 | newly = !git log $(git prev-commit)..HEAD --reverse -C 96 | newlyp = !git newly -p 97 | prev-commit = !git reflog show --format=%H | uniq | head -n 2 | tail -n 1 98 | fl = !git log $(git base-commit)..HEAD --reverse 99 | flp = !git log $(git base-commit)..HEAD --reverse -p 100 | m = merge --no-ff --no-edit 101 | s = show 102 | ss = show --stat 103 | raw = show --format=raw 104 | st = status --short --branch 105 | t = tag 106 | sh = stash save --include-untracked 107 | sp = stash pop 108 | stl = stash list 109 | sts = stash show 110 | stsv = stash show -p 111 | cancel = !git commit --all --message='Temporary commit for cancel' && git reset --hard HEAD~ 112 | return = reset HEAD~ 113 | rollback = reset --hard HEAD~ 114 | chp = cherry-pick 115 | rb = rebase 116 | rbu = !git rebase --onto="$(git base-head)" "$(git base-commit)" 117 | rbui = !git rebase -i --onto="$(git base-head)" "$(git base-commit)" 118 | move-base = "!f() { \ 119 | [[ -n $1 ]] && \ 120 | git rebase --onto $1 $(git base-commit) && \ 121 | git set-base-branch $1; \ 122 | }; f" 123 | rbi = rebase -i 124 | rbc = rebase --continue 125 | rba = rebase --abort 126 | df = !git diff "$(git base-commit)" 127 | bf = ![[ -z "${GIT_PREFIX}" ]] || cd "${GIT_PREFIX}" && git diff --name-only "$(git base-commit)" --relative 128 | conflicts = diff --name-only --diff-filter=U 129 | upst = rebase origin/master 130 | gene = log --graph --date=iso --pretty=gene 131 | genea = log --graph --date=iso --pretty=gene --exclude='refs/notes/*' --all 132 | gr = log --graph --date=iso --pretty=genegr 133 | hist = log -p --reverse --stat --color-words -C 134 | recent = log --date=relative --pretty=recent --reverse -10 135 | ranking = shortlog -s -n --no-merges 136 | wip = commit -a -m '[WIP]' 137 | pl = pull 138 | ph = push 139 | phf = push --force-with-lease 140 | release = push origin master --tags 141 | dci = svn dcommit 142 | sci = svn dcommit 143 | sup = svn rebase 144 | ignore = update-index --assume-unchanged 145 | unignore = update-index --no-assume-unchanged 146 | ignored = !git ls-files -v | grep "^[a-z]" 147 | pr = "!f() { \ 148 | git fetch --update-head-ok ${2:-origin} pull/$1/head:pr-$1; \ 149 | }; f" 150 | sb = !git sweep-branch 151 | sweep-branch = "!f() { \ 152 | b=$(git spent-branches); \ 153 | [[ -z \"$b\" ]] || git branch --delete $b; \ 154 | }; f" 155 | merged-branches = for-each-ref refs/heads/ --format='%(refname:short)' --merged 156 | spent-branches = "!f() { \ 157 | git merged-branches ${1} | \ 158 | grep -Ev \"^(${1}|master|main|develop|$(git worktree-bases | sed 's/.*/^&$/' | paste -s -d'|' -))\\$\"; \ 159 | }; f ${1:-$(git current-branch)}" 160 | worktree-bases = "!git worktree list --porcelain | grep '^worktree' | sed 's/^worktree //' | xargs -IX basename X" 161 | current-branch = branch --show-current 162 | current-remote = !git branch-remote "$(git current-branch)" 163 | branch-remote = "!f() { \ 164 | local b=\"${1:?Branch name required.}\" && \ 165 | local r=$(git config \"branch.${b}.remote\") && \ 166 | ([[ ${b} == ${2} ]] && \ 167 | echo origin || \ 168 | echo \"${r:-$(git branch-remote \"$(git base-branch)\" \"${b}\")}\" \ 169 | ); \ 170 | }; f" 171 | remote-branch = "!f() { \ 172 | echo \"$(git branch-remote \"${1}\")/${1}\"; \ 173 | }; f" 174 | branch-head = "!f() { \ 175 | local b=\"${1:-$(git current-branch)}\" && \ 176 | local r=\"$(git remote-branch \"${b}\")\" && \ 177 | git show-ref --verify --quiet \"refs/heads/${b}\" \"refs/remotes/${r}\" && \ 178 | (git merge-base --is-ancestor \"${b}\" \"${r}\" && \ 179 | echo \"${r}\" || echo \"${b}\"); \ 180 | }; f" 181 | default-branch = "!f() { \ 182 | local r=\"${1:-$(git current-remote)}\"; \ 183 | local b=$(git symbolic-ref --short \"refs/remotes/${r}/HEAD\" 2>/dev/null || \ 184 | { git remote set-head \"${r}\" --auto >/dev/null && \ 185 | git symbolic-ref --short \"refs/remotes/${r}/HEAD\"; }); \ 186 | echo \"${b#*/}\"; \ 187 | }; f" 188 | base-branch = "!f() { \ 189 | git config \"branch.${1:-$(git current-branch)}.base\" || git config branch.default; \ 190 | }; f" 191 | set-base-branch = "!f() { \ 192 | git config \"branch.${2:-$(git current-branch)}.base\" \"${1}\"; \ 193 | }; f" 194 | base-remote = "!f() { \ 195 | git branch-remote \"$(git base-branch \"${1}\")\"; \ 196 | }; f" 197 | base-full = "!f() { \ 198 | git remote-branch \"$(git base-branch \"${1}\")\"; \ 199 | }; f" 200 | base-head = "!f() { \ 201 | git branch-head \"$(git base-branch \"${1}\")\"; \ 202 | }; f" 203 | base-commit = !git merge-base "$(git base-head)" HEAD 204 | features = "!f() { \ 205 | git branch | \ 206 | cut -c3- | \ 207 | while read b; \ 208 | do echo \"$(git config \"branch.${b}.base\") -> ${b}\"; \ 209 | done | \ 210 | grep -v '^ -> ' | \ 211 | grep \"^${1:-$(git current-branch)} ->\" | \ 212 | sort; \ 213 | }; f" 214 | chx = update-index --chmod=+x 215 | grev = !git push origin HEAD:refs/for/master/$(git current-branch) 216 | grevb = !git push origin HEAD:refs/for/$(git current-branch) 217 | grevm = push origin HEAD:refs/for/master 218 | prefix-branch = "!f() { \ 219 | git branch --move \"${1:?Input prefix}-$(git current-branch)\"; \ 220 | }; f" 221 | remote-fork = "!f() { \ 222 | git remote rename origin upstream && \ 223 | git remote add origin \"$(git config remote.upstream.url | sed 's;^\\(git@\\|https://\\)github\\.com[/:][^/]\\+/;git@github.com:thinca/;')\" && \ 224 | git config pr.remote upstream && \ 225 | git fetch origin; \ 226 | }; f" 227 | gh-repo = "!f() { \ 228 | local r=${1:-$(git config pr.remote)}; \ 229 | git remote get-url \"${r:-origin}\" | perl -pe 's;^(?:git@|https://)([^/:]*)[:/](.*?)(?:\\.git)?$;\\1/\\2;'; \ 230 | }; f" 231 | open-cmd = "!((type open >/dev/null 2>&1) && echo open) || ((type lemonade >/dev/null 2>&1) && echo 'lemonade open') || ((type xdg-open >/dev/null 2>&1) && echo xdg-open) || echo echo" 232 | pr-url = "!f() { \ 233 | local r=${1:-$(git config pr.remote)} o; \ 234 | [[ ${r:-origin} == \"origin\" ]] || o=$(git remote get-url origin | sed 's;.*github\\.com[/:]\\([^/]*\\)/.*;\\1:;'); \ 235 | echo \"https://$(git gh-repo ${r})/compare/$(git base-branch)...${o}$(git current-branch)?expand=1\"; \ 236 | }; f" 237 | mkpr = "!f() { \ 238 | $(git open-cmd) \"$(git pr-url \"$*\")\"; \ 239 | }; f" 240 | [pretty] 241 | gene = format:%C(yellow)%h%Creset %ad %an: %s%C(yellow)%d%Creset 242 | genegr = format:%h %ad %an: %s%d 243 | recent = format:%C(yellow)%h%Creset %ad %an: %s 244 | [diff "json"] 245 | textconv = "f() { awk 'NR==2{exit 1}' $1 && jq . $1 || cat $1; }; f" 246 | cachetextconv = true 247 | [rerere] 248 | enabled = true 249 | [include] 250 | path = delta.config 251 | path = ~/.gitconfig.local 252 | path = config.local 253 | 254 | # vim: ft=gitconfig 255 | -------------------------------------------------------------------------------- /dotfiles/dot.config/git/delta.config: -------------------------------------------------------------------------------- 1 | [delta] 2 | plus-color = "#012800" 3 | minus-color = "#ffffff" 4 | side-by-side = true 5 | wrap-max-lines = "unlimited" 6 | 7 | # vim: ft=gitconfig 8 | -------------------------------------------------------------------------------- /dotfiles/dot.config/git/ignore: -------------------------------------------------------------------------------- 1 | *.o 2 | *.lo 3 | *.la 4 | #*# 5 | .*.rej 6 | *.rej 7 | *~ 8 | .#* 9 | .DS_Store 10 | *.sw[po] 11 | tags 12 | tags-* 13 | GPATH 14 | GRTAGS 15 | GTAGS 16 | .*.vimrc 17 | , 18 | 19 | # Vim 20 | .vim-lsp-settings/ 21 | 22 | # Mise 23 | .mise.local.toml 24 | .mise.*.local.toml 25 | .mise/ 26 | 27 | # Ruby 28 | Gemfile.private 29 | Gemfile.private.lock 30 | .bundle 31 | vendor/bundle 32 | .solargraph.yml 33 | 34 | # Node.js 35 | .nyc_output/ 36 | -------------------------------------------------------------------------------- /dotfiles/dot.config/mintty/config: -------------------------------------------------------------------------------- 1 | BoldAsFont=-1 2 | Scrollbar=none 3 | Language=ja 4 | Font=Cica 5 | CursorType=block 6 | Columns=164 7 | Rows=40 8 | Window=full 9 | Term=xterm-256color 10 | Locale=ja_JP 11 | Charset=UTF-8 12 | KeyFunctions=*A+Enter:fullscreen;A+v:paste 13 | CursorColour=0,255,0 14 | IMECursorColour=255,0,0 15 | FontHeight=11 16 | -------------------------------------------------------------------------------- /dotfiles/dot.config/mise/config.toml: -------------------------------------------------------------------------------- 1 | [tools] 2 | usage = "latest" 3 | clojure = "latest" 4 | deno = "latest" 5 | elixir = "latest" 6 | erlang = "latest" 7 | gauche = "latest" 8 | golang = "latest" 9 | groovy = "latest" 10 | haskell = "latest" 11 | java = "latest" 12 | julia = "latest" 13 | kotlin = "latest" 14 | lua = "latest" 15 | luajit = "latest" 16 | nodejs = "latest" 17 | ocaml = "latest" 18 | perl = "latest" 19 | php = "latest" 20 | python = ["3", "2"] 21 | racket = "latest" 22 | rclone = "latest" 23 | ruby = "latest" 24 | rust = "latest" 25 | scala = "latest" 26 | zig = "latest" 27 | 28 | [settings] 29 | experimental = true 30 | -------------------------------------------------------------------------------- /dotfiles/dot.config/surfingkeys/surfingkeys.js: -------------------------------------------------------------------------------- 1 | const { 2 | mapkey, 3 | map, 4 | iunmap, 5 | Front, 6 | Hints, 7 | } = api; 8 | 9 | //Hints.characters = "asdfgqwertzxcvb"; // Default 10 | Hints.characters = "jklfdsahguiorewtymnpbvcxz"; 11 | // Hints.numericHints = true; 12 | 13 | settings.hintAlign = "left"; 14 | // settings.omnibarPosition = "bottom"; // Default: "middle" 15 | // settings.focusFirstCandidate = true; 16 | settings.scrollStepSize = 140; // Default: 70 17 | 18 | map("gt", "R"); 19 | map("gT", "E"); 20 | 21 | map("<", "<<"); 22 | map(">", ">>"); 23 | 24 | map("p", "cc"); 25 | map("u", "X"); 26 | 27 | map("H", "S"); 28 | map("L", "D"); 29 | 30 | map("F", "af"); 31 | 32 | map("", "e"); 33 | map("", "d"); 34 | 35 | mapkey("b", 'Choose a tab with omnibar', () => { 36 | Front.openOmnibar({type: "Tabs"}); 37 | }); 38 | 39 | iunmap(":"); 40 | 41 | // https://github.com/brookhong/Surfingkeys/issues/2285#issuecomment-2868207432 42 | iunmap(""); 43 | -------------------------------------------------------------------------------- /dotfiles/dot.config/tmux/tmux.conf: -------------------------------------------------------------------------------- 1 | # Options 2 | set-option -g status-keys vi 3 | set-option -g default-terminal screen-256color 4 | set-option -ga terminal-overrides ",$TERM:Tc" 5 | 6 | set-option -g status-left-length 30 7 | set-option -g status-right '%Y-%m-%d %H:%M' 8 | set-option -g visual-bell on 9 | set-option -g history-limit 32768 10 | set-option -g mouse on 11 | set-option -g set-titles on 12 | set-option -g set-titles-string "#W #{session_alerts}" 13 | set-option -g base-index 1 14 | set-option -g renumber-windows on 15 | set-option -g detach-on-destroy off 16 | 17 | set-option -gw automatic-rename off 18 | set-option -g allow-rename on 19 | 20 | set-option -g display-time 3000 21 | 22 | set-option -g escape-time 8 23 | 24 | # update-environment SSH_CLIENT 25 | 26 | # Colors 27 | set-option -ga status-style "bg=white" 28 | set-option -gwa window-status-current-style "bg=cyan" 29 | 30 | # Keys 31 | ## Prefix key 32 | set-option -g prefix C-z 33 | unbind-key C-b 34 | bind-key C-z send-prefix 35 | 36 | set-option -gw mode-keys vi 37 | 38 | bind-key . source-file -q ~/.tmux.conf ~/.config/tmux/tmux.conf 39 | 40 | # Open a new window at the right of current window instead of at the rightest 41 | bind-key c new-window -a 42 | bind-key < swap-window -dt - 43 | bind-key > swap-window -dt + 44 | bind-key T break-pane 45 | bind-key S command-prompt -p "(new-session)" "new-session -s \"%%%\"" 46 | bind-key L choose-tree -w "link-window -s '%%'" 47 | 48 | bind-key -T copy-mode-vi v send-keys -X begin-selection 49 | bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel 50 | 51 | if-shell 'type lemonade >/dev/null' { 52 | bind-key ] run-shell "lemonade paste | tmux load-buffer -" \; paste-buffer 53 | bind-key -T copy-mode-vi y send -X copy-pipe-and-cancel "lemonade copy" 54 | } 55 | if-shell '[[ "$(uname)" == "Darwin" ]]' { 56 | source-file -q ~/.tmux.mac.conf ~/.config/tmux/tmux.mac.conf 57 | } 58 | 59 | # vim: ft=tmux 60 | -------------------------------------------------------------------------------- /dotfiles/dot.config/tmux/tmux.mac.conf: -------------------------------------------------------------------------------- 1 | bind-key ] run-shell "pbpaste | tmux load-buffer - && tmux paste-buffer" 2 | 3 | bind-key -T copy-mode-vi y send -X copy-pipe-and-cancel "pbcopy" 4 | 5 | # vim: ft=tmux 6 | -------------------------------------------------------------------------------- /dotfiles/dot.config/wtrans/wtrans.yaml: -------------------------------------------------------------------------------- 1 | defaults: 2 | service: 'google' 3 | singlebyteLanguage: 'en' 4 | multibyteLanguage: 'ja' 5 | toLanguageCandidates: ['en', 'ja'] 6 | 7 | puppeteerOptions: 8 | defaultViewport: 9 | width: 1920 10 | height: 1080 11 | 12 | services: 13 | google: 14 | url: 'https://translate.google.com/' 15 | ajax: true 16 | sourceNodeSelector: '#source' 17 | resultContainerSelector: '.results-container' 18 | resultNodeSelector: '.translation' 19 | ignoreResultXPath: '//span[contains(@class,"translation") and contains(text(),"...")]' 20 | actions: 21 | execute: [] 22 | from_en: 23 | - click: '.tlid-open-source-language-list' 24 | - click: '.language-list:not([style*="display: none"]) .language_list_section:last-child .language_list_item_wrapper-en' 25 | from_ja: 26 | - click: '.tlid-open-source-language-list' 27 | - click: '.language-list:not([style*="display: none"]) .language_list_section:last-child .language_list_item_wrapper-ja' 28 | to_en: 29 | - click: '.tlid-open-target-language-list' 30 | - click: '.language-list:not([style*="display: none"]) .language_list_section:last-child .language_list_item_wrapper-en' 31 | to_ja: 32 | - click: '.tlid-open-target-language-list' 33 | - click: '.language-list:not([style*="display: none"]) .language_list_section:last-child .language_list_item_wrapper-ja' 34 | 35 | bing: 36 | url: 'https://www.bing.com/Translator' 37 | ajax: true 38 | sourceNodeSelector: '#tta_input_ta' 39 | resultNodeSelector: '#tta_output_ta' 40 | ignoreResultPattern: ' \.\.\.$' 41 | actions: 42 | execute: [] 43 | from_en: 44 | - select: ['#tta_srcsl', 'en'] 45 | from_ja: 46 | - select: ['#tta_srcsl', 'ja'] 47 | to_en: 48 | - select: ['#tta_tgtsl', 'en'] 49 | to_ja: 50 | - select: ['#tta_tgtsl', 'ja'] 51 | 52 | excite: 53 | url: 'https://www.excite.co.jp/world/english/' 54 | requestFilters: 55 | acceptURLPattern: '^https://www\.excite\.co\.jp/world/english/|^https://s\.eximg\.jp/world/jsmin/live/two_column_web\.min\.js' 56 | ajax: false 57 | sourceNodeSelector: '#before' 58 | resultNodeSelector: '#after' 59 | actions: 60 | from_en: 61 | - click: '#before_en' 62 | from_ja: 63 | - click: '#before_ja' 64 | execute: 65 | - click: '#exec_transfer' 66 | 67 | weblio: 68 | url: 'https://translate.weblio.jp/' 69 | requestFilters: 70 | acceptURLPattern: '^https://(translate\.weblio\.jp)/|\.js' 71 | ajax: false 72 | sourceNodeSelector: '#originalTextArea' 73 | resultNodeSelector: '#transResultMainLn li' 74 | actions: 75 | execute_from_en_to_ja: 76 | - click: '#EJH' 77 | execute_from_ja_to_en: 78 | - click: '#JEH' 79 | 80 | infoseek: 81 | url: 'http://translation.infoseek.ne.jp/' 82 | ajax: true 83 | sourceNodeSelector: '#source' 84 | resultNodeSelector: '#rep-layer' 85 | ignoreResultXPath: './/img' 86 | actions: 87 | from_en: 88 | - click: '.lf_menu li a[rel=en]' 89 | from_ja: 90 | - click: '.lf_menu li a[rel=ja]' 91 | to_en: 92 | - click: '#op1a_1' 93 | - click: "#ul-lng-to a[onclick*='en']" 94 | to_ja: 95 | - click: '#op1a_1' 96 | - click: "#ul-lng-to a[onclick*='ja']" 97 | execute: 98 | - click: '#op1a_3' 99 | 100 | worldlingo: 101 | url: 'http://www.worldlingo.com/en/products/text_translator.html' 102 | requestFilters: 103 | acceptURLPattern: '^http://www\.worldlingo\.com/' 104 | ajax: false 105 | sourceNodeSelector: '#wl_text' 106 | resultNodeSelector: '#wl_text_result' 107 | actions: 108 | from_en: 109 | - select: ['#SelSrcLang', 'EN'] 110 | from_ja: 111 | - select: ['#SelSrcLang', 'JA'] 112 | to_en: 113 | - select: ['#SelTrgLang', 'EN'] 114 | to_ja: 115 | - select: ['#SelTrgLang', 'JA'] 116 | execute: 117 | - click: '#BtnTranslate' 118 | -------------------------------------------------------------------------------- /dotfiles/dot.ctags: -------------------------------------------------------------------------------- 1 | --tag-relative=yes 2 | --exclude=vendor 3 | --exclude=node_modules 4 | --exclude=coverage 5 | --exclude=*.json 6 | --regex-vim=/^function\!?[ \t]*([a-zA-Z0-9_:.#]+)/\1/f,function/ 7 | --langdef=scala 8 | --langmap=scala:.scala 9 | --regex-scala=/^[ \t]*((abstract|final|sealed|implicit|lazy)[ \t]*)*(private|protected)?[ \t]*class[ \t]+([a-zA-Z0-9_]+)/\4/c,classes/ 10 | --regex-scala=/^[ \t]*((abstract|final|sealed|implicit|lazy)[ \t]*)*(private|protected)?[ \t]*object[ \t]+([a-zA-Z0-9_]+)/\4/o,objects/ 11 | --regex-scala=/^[ \t]*((abstract|final|sealed|implicit|lazy)[ \t]*)*(private|protected)?[ \t]*case class[ \t]+([a-zA-Z0-9_]+)/\4/C,case classes/ 12 | --regex-scala=/^[ \t]*((abstract|final|sealed|implicit|lazy)[ \t]*)*(private|protected)?[ \t]*case object[ \t]+([a-zA-Z0-9_]+)/\4/O,case objects/ 13 | --regex-scala=/^[ \t]*((abstract|final|sealed|implicit|lazy)[ \t]*)*(private|protected)?[ \t]*trait[ \t]+([a-zA-Z0-9_]+)/\4/t,traits/ 14 | --regex-scala=/^[ \t]*type[ \t]+([a-zA-Z0-9_]+)/\1/T,types/ 15 | --regex-scala=/^[ \t]*((abstract|final|sealed|implicit|lazy)[ \t]*)*def[ \t]+([a-zA-Z0-9_]+)/\3/m,methods/ 16 | --regex-scala=/^[ \t]*((abstract|final|sealed|implicit|lazy)[ \t]*)*val[ \t]+([a-zA-Z0-9_]+)/\3/l,constants/ 17 | --regex-scala=/^[ \t]*((abstract|final|sealed|implicit|lazy)[ \t]*)*var[ \t]+([a-zA-Z0-9_]+)/\3/v,variables/ 18 | --regex-scala=/^[ \t]*package[ \t]+([a-zA-Z0-9_.]+)/\1/p,packages/ 19 | 20 | -------------------------------------------------------------------------------- /dotfiles/dot.hgignore: -------------------------------------------------------------------------------- 1 | syntax: glob 2 | *.o 3 | *.lo 4 | *.la 5 | #*# 6 | .*.rej 7 | *.rej 8 | .* 9 | *~ 10 | .#* 11 | .DS_Store 12 | *.sw[po] 13 | tags 14 | tags-* 15 | .*.vimrc 16 | build 17 | -------------------------------------------------------------------------------- /dotfiles/dot.hgrc: -------------------------------------------------------------------------------- 1 | [ui] 2 | username = thinca 3 | ignore = ~/.hgignore 4 | editor = vim 5 | 6 | [alias] 7 | h = help 8 | b = branch 9 | l = log 10 | d = diff 11 | gene = log --template '{rev} {date|isodate} {author}: {desc|firstline}\n' --graph 12 | 13 | [extensions] 14 | rebase = 15 | color = 16 | pager = 17 | fetch = 18 | purge = 19 | graphlog = 20 | mq = 21 | convert = 22 | progress = 23 | transplant = 24 | 25 | [color] 26 | status.ignored = white 27 | 28 | [pager] 29 | attend = help, h, annotate, cat, diff, d, export, glog, log, l, tags, qdiff, gene 30 | 31 | -------------------------------------------------------------------------------- /dotfiles/dot.inputrc: -------------------------------------------------------------------------------- 1 | # For multibyte character input and output. 2 | set input-meta on 3 | set convert-meta off 4 | set output-meta on 5 | 6 | set bell-style none 7 | 8 | # vi like key bind. 9 | set editing-mode vi 10 | # Ignore case for filename completion. 11 | set completion-ignore-case on 12 | set history-preserve-point on 13 | 14 | TAB: menu-complete 15 | 16 | # Key bindings. 17 | "\C- r": re-read-init-file 18 | "\C- \C-r": re-read-init-file 19 | 20 | "\C-p": history-search-backward 21 | "\C-n": history-search-forward 22 | 23 | "\C-l": clear-screen 24 | -------------------------------------------------------------------------------- /dotfiles/dot.irbrc: -------------------------------------------------------------------------------- 1 | IRB.conf[:SAVE_HISTORY] = 1000 2 | IRB.conf[:AUTO_INDENT] = true 3 | IRB.conf[:PROMPT][:SIMPLE] = { 4 | :PROMPT_I => "%03n:>> ", 5 | :PROMPT_N => "%03n:%i>", 6 | :PROMPT_S => "%03n:>%l ", 7 | :PROMPT_C => "%03n:>> ", 8 | :RETURN => "=> %s\n" 9 | } 10 | IRB.conf[:PROMPT_MODE] = :SIMPLE 11 | 12 | 13 | alias q exit 14 | 15 | # vim: ft=ruby 16 | -------------------------------------------------------------------------------- /dotfiles/dot.mlterm/color: -------------------------------------------------------------------------------- 1 | black=#000000 2 | red=#e60000 3 | green=#00e600 4 | yellow=#e6e600 5 | blue=#0000e6 6 | magenta=#e600e6 7 | cyan=#00e66e 8 | white=#e6e6e6 9 | hl_black=#000000 10 | hl_red=#e60000 11 | hl_green=#00e600 12 | hl_yellow=#e6e600 13 | hl_blue=#0000e6 14 | hl_magenta=#e600e6 15 | hl_cyan=#00e66e 16 | hl_white=#e6e6e6 17 | -------------------------------------------------------------------------------- /dotfiles/dot.mlterm/font: -------------------------------------------------------------------------------- 1 | #DEFAULT = 15,VL ゴシック 15 2 | #ISO8859_1=15,VL ゴシック 15 3 | #ISO8859_1_BOLD=15,VL ゴシック 15 4 | #JISX0208_1983=15,VL ゴシック 15 5 | #JISX0208_1983_BOLD=15,VL ゴシック 15 6 | #ISO10646_UCS4_1 = 15,VL ゴシック 15 7 | #ISO10646_UCS4_1=15,VL ゴシック 15 8 | #ISO10646_UCS4_1_BIWIDTH=15,VL ゴシック 15 9 | -------------------------------------------------------------------------------- /dotfiles/dot.mlterm/main: -------------------------------------------------------------------------------- 1 | termtype = xterm-256color 2 | scrollbar_mode = none 3 | bg_color = black 4 | fg_color = white 5 | fontsize = 15 6 | #use_anti_alias = true 7 | not_use_unicode_font = true 8 | iso88591_font_for_usascii = true 9 | col_size_of_width_a = 2 10 | mod_meta_key = alt 11 | mod_meta_mode = esc 12 | type_engine = xft 13 | # vim: ft=conf 14 | -------------------------------------------------------------------------------- /dotfiles/dot.npmrc: -------------------------------------------------------------------------------- 1 | //registry.npmjs.org/:_authToken=${NPM_TOKEN} 2 | prefix=${HOME}/.npm 3 | email=thinca+npm@gmail.com 4 | init-license=Zlib 5 | init-author-email=thinca+npm@gmail.com 6 | init-author-name=thinca 7 | sign-git-tag=true 8 | -------------------------------------------------------------------------------- /dotfiles/dot.pyrc: -------------------------------------------------------------------------------- 1 | import rlcompleter, readline 2 | readline.parse_and_bind('tab: complete') 3 | 4 | # vim:ft=python 5 | -------------------------------------------------------------------------------- /dotfiles/dot.screenrc: -------------------------------------------------------------------------------- 1 | logfile $HOME/.log/screen/%y%m%d-%n.log 2 | # deflog on 3 | 4 | escape ^z^z 5 | 6 | ## http://frexx.de/xterm-256-notes/ 7 | ## erase background with current bg color 8 | defbce "on" 9 | ## do not use 'screen-bce' 10 | term xterm-256color 11 | 12 | defscrollback 10000 13 | autodetach on 14 | defutf8 on 15 | 16 | ignorecase on 17 | 18 | caption always " %`%{= wk}%-w%{=b bw}%n %t%{-}%+w" 19 | hardstatus alwayslastline " %04Y/%02m/%02d %02c%=%l " 20 | 21 | bind ^R command -c region 22 | bind -c region + eval 'resize +1' 'command -c region' 23 | bind -c region - eval 'resize -1' 'command -c region' 24 | 25 | bind N command -c number 26 | bind -c number 0 number 0 27 | bind -c number 1 number 1 28 | bind -c number 2 number 2 29 | bind -c number 3 number 3 30 | bind -c number 4 number 4 31 | bind -c number 5 number 5 32 | bind -c number 6 number 6 33 | bind -c number 7 number 7 34 | bind -c number 8 number 8 35 | bind -c number 9 number 9 36 | 37 | bind . source $HOME/.screenrc 38 | 39 | layout save main 40 | 41 | # vim: ft=screen 42 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/autoload/vimrc.vim: -------------------------------------------------------------------------------- 1 | let s:prev_file_pat = '.' 2 | function vimrc#grep(...) abort 3 | if 2 <= a:0 4 | let files = a:1 5 | let pat = join(a:000[1 :], ' ') 6 | elseif a:0 == 1 7 | let files = s:prev_file_pat 8 | let pat = a:1 9 | else 10 | return 11 | endif 12 | if &grepprg ==# 'internal' 13 | execute 'vimgrep' '/' .. escape(pat, '/') .. '/j' files 14 | else 15 | execute 'grep!' '"' .. escape(pat, '%#') .. '"' files 16 | endif 17 | endfunction 18 | 19 | function vimrc#move(file, bang, base) abort 20 | let pwd = getcwd() 21 | cd `=a:base` 22 | try 23 | let from = expand('%:p') 24 | let to = simplify(expand(a:file)) 25 | let bang = a:bang 26 | if isdirectory(to) 27 | let to ..= '/' .. fnamemodify(from, ':t') 28 | endif 29 | if filereadable(to) && !bang 30 | echo '"' .. to .. '" is exists. Overwrite? [yN]' 31 | if nr2char(getchar()) !=? 'y' 32 | echo 'Cancelled.' 33 | return 34 | endif 35 | let bang = '!' 36 | endif 37 | let dir = fnamemodify(to, ':h') 38 | call mkdir(dir, 'p') 39 | execute 'saveas' .. bang '`=to`' 40 | call delete(from) 41 | finally 42 | cd `=pwd` 43 | endtry 44 | endfunction 45 | 46 | function vimrc#delete_with_confirm(file, force) abort 47 | let file = a:file ==# '' ? expand('%') : a:file 48 | if !a:force 49 | echo 'Delete "' .. file .. '"? [y/N]:' 50 | endif 51 | if a:force || nr2char(getchar()) ==? 'y' 52 | call delete(file) 53 | echo 'Deleted "' .. file .. '"!' 54 | else 55 | echo 'Cancelled.' 56 | endif 57 | endfunction 58 | 59 | function vimrc#unique_lines(pat) range abort 60 | let lines = g:V.uniq_by( 61 | \ getline(a:firstline, a:lastline), 62 | \ { val -> a:pat ==# '' ? val : matchstr(val, a:pat) } 63 | \ ) 64 | silent execute a:firstline .. ',' .. a:lastline .. 'delete _' 65 | silent execute (a:firstline - 1) .. 'put =lines' 66 | endfunction 67 | 68 | function vimrc#ctags(args) abort 69 | let args = a:args 70 | let dir = '.' 71 | if !empty(args) && isdirectory(args[0]) 72 | let dir = args[0] 73 | call remove(args, 0) 74 | endif 75 | 76 | if !empty(args) && args[0] !~# '^-' 77 | echoerr 'Invalid options: ' .. join(args) 78 | return 79 | endif 80 | 81 | let tagfile = s:tagfile() 82 | if tagfile !=# '' 83 | let dir = fnamemodify(tagfile, ':h') 84 | let args += ['-f', tagfile] 85 | endif 86 | 87 | if has('win32') 88 | let enc = get({ 89 | \ 'utf-8': 'utf8', 90 | \ 'cp932': 'sjis', 91 | \ 'euc-jp': 'euc', 92 | \ }, &l:fileencoding ==# '' ? &encoding : &l:fileencoding, '') 93 | if enc !=# '' 94 | let args += ['--jcode=' .. enc] 95 | endif 96 | endif 97 | let lang = get({ 98 | \ 'cpp': 'C++', 99 | \ 'c': 'C++', 100 | \ 'java': 'Java', 101 | \ }, &l:filetype, '') 102 | if lang !=# '' 103 | let args += ['--languages=' .. lang] 104 | endif 105 | 106 | call map(add(args, dir), 'shellescape(v:val)') 107 | 108 | let cmd = printf('ctags -R --tag-relative=yes %s', join(args)) 109 | if has('win32') 110 | let cmd = 'start /b ' .. cmd 111 | else 112 | let cmd ..= ' &' 113 | endif 114 | silent execute '!' .. cmd 115 | endfunction 116 | 117 | function s:tagfile() abort 118 | let files = tagfiles() 119 | return empty(files) ? '' : files[0] 120 | endfunction 121 | 122 | function vimrc#highlight_with(args) range abort 123 | if a:firstline == 1 && a:lastline == line('$') 124 | return 125 | endif 126 | let c = get(b:, 'highlight_count', 0) 127 | let ft = matchstr(a:args, '^\w\+') 128 | if globpath(&runtimepath, 'syntax/' .. ft .. '.vim') ==# '' 129 | return 130 | endif 131 | if exists('b:current_syntax') 132 | let syntax = b:current_syntax 133 | unlet b:current_syntax 134 | endif 135 | let save_isk = &l:isk " for scheme. 136 | let hlname = 'highlightWith' .. substitute(ft, '^.', '\u\0', '') 137 | if c != 0 138 | let hlname ..= '_' .. c 139 | endif 140 | execute printf('syntax include @%s syntax/%s.vim', hlname, ft) 141 | let &l:isk = save_isk 142 | execute printf('syntax region %s start=/\%%%dl/ end=/\%%%dl$/ ' 143 | \ .. 'contains=@%s containedin=ALL', 144 | \ hlname, a:firstline, a:lastline, hlname) 145 | let b:highlight_count = c + 1 146 | if exists('syntax') 147 | let b:current_syntax = syntax 148 | endif 149 | endfunction 150 | 151 | function vimrc#keep_cursor(cmd) abort 152 | let curwin_id = win_getid() 153 | let view = winsaveview() 154 | try 155 | execute a:cmd 156 | finally 157 | if win_getid() == curwin_id 158 | call winrestview(view) 159 | endif 160 | endtry 161 | endfunction 162 | 163 | function vimrc#opener(cmdline, ...) abort 164 | if a:0 165 | let file = a:1 166 | else 167 | let arg = matchstr(a:cmdline, '\%(\\.\|\S\)\+$') 168 | if arg =~# '^`.*`$' 169 | let arg = system(file[1 : -2]) 170 | endif 171 | let file = resolve(fnamemodify(glob(arg), ':p')) 172 | endif 173 | let opened = s:bufopened(file) 174 | let opt = a:cmdline[: -len(arg) - 1] 175 | if !empty(opened) 176 | execute 'tabnext' opened[0] 177 | execute opened[1] 'wincmd w' 178 | if opt =~# '\S' 179 | silent execute 'edit' opt 180 | endif 181 | else 182 | return 'tabnew ' .. a:cmdline 183 | endif 184 | return '' 185 | endfunction 186 | 187 | function s:bufopened(file) abort 188 | let f = fnamemodify(a:file, ':p') 189 | for tabnr in range(1, tabpagenr('$')) 190 | let winnr = 1 191 | for nbuf in tabpagebuflist(tabnr) 192 | if f ==# fnamemodify(bufname(nbuf), ':p') 193 | return [tabnr, winnr] 194 | endif 195 | let winnr += 1 196 | endfor 197 | endfor 198 | return [] 199 | endfunction 200 | 201 | function vimrc#check_interface() abort 202 | try 203 | let lua_ver = substitute(luaeval('_VERSION'), '^Lua ', 'v', '') 204 | catch 205 | let lua_ver = 'no' 206 | endtry 207 | echo 'Lua ... ' .. lua_ver 208 | 209 | try 210 | let perl_ver = perleval('"$^V"') 211 | catch 212 | let perl_ver = 'no' 213 | endtry 214 | echo 'Perl ... ' .. perl_ver 215 | 216 | try 217 | python import platform 218 | let python_ver = 'v' .. pyeval('platform.python_version()') 219 | catch 220 | let python_ver = 'no' 221 | endtry 222 | echo 'Python 2 ... ' .. python_ver 223 | 224 | try 225 | python3 import platform 226 | let python3_ver = 'v' .. py3eval('platform.python_version()') 227 | catch 228 | let python3_ver = 'no' 229 | endtry 230 | echo 'Python 3 ... ' .. python3_ver 231 | 232 | try 233 | ruby Vim::command("let ruby_ver = 'v#{RUBY_VERSION}'") 234 | catch 235 | let ruby_ver = 'no' 236 | endtry 237 | echo 'Ruby ... ' .. ruby_ver 238 | 239 | try 240 | tcl ::vim::command "let tcl_ver = 'v[info patchlevel]'" 241 | catch 242 | let tcl_ver = 'no' 243 | endtry 244 | echo 'Tcl ... ' .. tcl_ver 245 | 246 | try 247 | let mzscheme_ver = 'v' .. mzeval('(version)') 248 | catch 249 | let mzscheme_ver = 'no' 250 | endtry 251 | echo 'MzScheme ... ' .. mzscheme_ver 252 | endfunction 253 | 254 | function vimrc#time(cmd, log) abort 255 | if !has('reltime') 256 | echo 'Feature +reltime is disabled.' . 257 | \ ' Do you run the command in normally?[y/N]' 258 | if getchar() =~? 'y' 259 | execute a:cmd 260 | endif 261 | return 262 | endif 263 | 264 | let time = reltime() 265 | let mes = execute(a:cmd) 266 | let result = a:cmd .. ': ' .. reltimestr(reltime(time)) 267 | 268 | echo mes 269 | 270 | if a:log 271 | echomsg result 272 | else 273 | echo result 274 | endif 275 | endfunction 276 | 277 | def vimrc#profile(cmd: string): void 278 | const dir = expand('~/.local/log/vim/') 279 | mkdir(dir, 'p') 280 | const filename = dir .. strftime('profile_%Y-%m-%d_%H-%M-%S.log') 281 | execute $'profile start {filename}' 282 | profile! file * 283 | profile func * 284 | execute cmd 285 | profile stop 286 | new `=filename` 287 | enddef 288 | 289 | def vimrc#modulo(m: number, n: number): number 290 | const d = m * n < 0 ? 1 : 0 291 | return m + (-(m + (0 < n ? d : -d)) / n + d) * n 292 | enddef 293 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/autoload/vimrc/ddu.vim: -------------------------------------------------------------------------------- 1 | def vimrc#ddu#file_external_cmd(path: string): list 2 | var full_path = fnamemodify(path, ':p') 3 | if finddir('.git', full_path .. ';') !=# '' || 4 | findfile('.git', full_path .. ';') !=# '' 5 | return ['git', 'ls-files', '--cached', '--others', '--exclude-standard'] 6 | endif 7 | if executable('fd') 8 | return [ 9 | 'fd', 10 | '--hidden', 11 | '--type', 'file', 12 | '--type', 'symlink', 13 | '--exclude', '.git', 14 | '--color', 'never', 15 | ] 16 | endif 17 | if executable('find') 18 | return ['find'] 19 | endif 20 | return [] 21 | enddef 22 | 23 | def vimrc#ddu#setup_ui_ff_buffer() 24 | b:cursorline_disable = v:true 25 | setlocal cursorline 26 | nnoremap 27 | \ call ddu#ui#do_action('itemAction') 28 | nnoremap s 29 | \ call ddu#ui#do_action('toggleSelectItem') 30 | nnoremap i 31 | \ call ddu#ui#do_action('openFilterWindow') 32 | nnoremap q 33 | \ call ddu#ui#do_action('quit') 34 | 35 | if b:ddu_ui_name ==# 'file' 36 | s:setup_keymappings_for_file() 37 | endif 38 | enddef 39 | 40 | def vimrc#ddu#setup_ui_ff_filter_buffer() 41 | inoremap call ddu#ui#do_action('closeFilterWindow') 42 | nnoremap q call ddu#ui#do_action('closeFilterWindow') 43 | inoremap call ddu#ui#do_action('itemAction') 44 | nnoremap call ddu#ui#do_action('itemAction') 45 | 46 | inoremap getline('.') ==# '' ? 'call ddu#ui#do_action("quit")' : '' 47 | 48 | inoremap call cursor(+1) 49 | inoremap call cursor(-1) 50 | nnoremap call cursor(+1) 51 | nnoremap call cursor(-1) 52 | 53 | if b:ddu_ui_name ==# 'file' 54 | s:setup_keymappings_for_file() 55 | endif 56 | enddef 57 | 58 | def s:cursor(n: number) 59 | final cmd = $'call cursor(vimrc#modulo(line(".") + {n} - 1, line("$")) + 1, 0)' 60 | ddu#ui#ff#execute(cmd) 61 | redraw! 62 | enddef 63 | 64 | def s:setup_keymappings_for_file() 65 | nnoremap 66 | \ call ddu#ui#do_action( 67 | \ 'itemAction', 68 | \ #{name: 'open', params: #{command: 'botright split'}} 69 | \ ) 70 | nnoremap 71 | \ call ddu#ui#do_action( 72 | \ 'itemAction', 73 | \ #{name: 'open', params: #{command: 'botright vsplit'}} 74 | \ ) 75 | nnoremap 76 | \ call ddu#ui#do_action( 77 | \ 'itemAction', 78 | \ #{name: 'open', params: #{command: 'tabnew'}} 79 | \ ) 80 | 81 | inoremap 82 | \ call ddu#ui#do_action('closeFilterWindow')call ddu#ui#do_action( 83 | \ 'itemAction', 84 | \ #{name: 'open', params: #{command: 'botright split'}} 85 | \ ) 86 | inoremap 87 | \ call ddu#ui#do_action('closeFilterWindow')call ddu#ui#do_action( 88 | \ 'itemAction', 89 | \ #{name: 'open', params: #{command: 'botright vsplit'}} 90 | \ ) 91 | inoremap 92 | \ call ddu#ui#do_action('closeFilterWindow')call ddu#ui#do_action( 93 | \ 'itemAction', 94 | \ #{name: 'open', params: #{command: 'tabnew'}} 95 | \ ) 96 | enddef 97 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/dein.vim: -------------------------------------------------------------------------------- 1 | let $DEIN_BASE = expand('~/.local/share/vim/dein') 2 | let $DEIN_REPOS_DIR = expand('$DEIN_BASE/repos/github.com/Shougo/dein.vim') 3 | if !isdirectory($DEIN_REPOS_DIR) 4 | if !executable('git') 5 | echo 'Please install git.' 6 | finish 7 | endif 8 | call mkdir(fnamemodify($DEIN_REPOS_DIR, ':h'), 'p') 9 | call system('git clone https://github.com/Shougo/dein.vim.git ' . 10 | \ shellescape($DEIN_REPOS_DIR)) 11 | if !isdirectory($DEIN_REPOS_DIR) 12 | echo 'dein install failed.' 13 | finish 14 | endif 15 | endif 16 | set runtimepath^=$DEIN_REPOS_DIR 17 | 18 | let g:dein#enable_name_conversion = 1 19 | let g:dein#install_progress_type = 'floating' 20 | let g:dein#install_check_diff = 1 21 | " Existing of 'rsync' should be checked but skip because it is slow. 22 | let g:dein#install_copy_vim = has('win32') 23 | 24 | function s:update_cmpl(lead, line, pos) abort 25 | return filter(keys(dein#get()), 'v:val =~# "^" . a:lead') 26 | endfunction 27 | function s:source_cmpl(lead, line, pos) abort 28 | return keys(filter(dein#get(), 'v:key =~# "^" . a:lead && !v:val.sourced')) 29 | endfunction 30 | function s:call_with_non_empty(func, list) abort 31 | call call(a:func, empty(a:list) ? [] : [a:list]) 32 | endfunction 33 | command! -nargs=* -complete=customlist,s:update_cmpl -bang DeinUpdate 34 | \ call s:call_with_non_empty( 35 | \ (0 && !empty([])) || 36 | \ get(g:, 'dein#install_github_api_token', '') is# '' ? 37 | \ 'dein#update' : funcref('dein#check_update', [v:true]), []) 38 | command! -nargs=+ -complete=customlist,s:update_cmpl DeinReinstall 39 | \ call dein#reinstall([]) 40 | command! -nargs=* -complete=customlist,s:source_cmpl DeinSource 41 | \ call s:call_with_non_empty('dein#source', []) 42 | command! DeinRecache call dein#recache_runtimepath() 43 | 44 | if $DEIN_NO_PLUGINS 45 | call dein#begin($DEIN_BASE .. '.disable', []) 46 | call dein#end() 47 | finish 48 | endif 49 | 50 | if !dein#load_state($DEIN_BASE) 51 | finish 52 | endif 53 | 54 | let s:vimrcs = [expand('')] 55 | 56 | let s:local_dein = expand('~/.config/vim/local.dein.vim') 57 | let s:local_dein_exists = filereadable(s:local_dein) 58 | if s:local_dein_exists 59 | let s:vimrcs += [s:local_dein] 60 | endif 61 | 62 | call dein#begin($DEIN_BASE, s:vimrcs) 63 | 64 | if $DROPBOX_HOME !=# '' 65 | call dein#local($DROPBOX_HOME . '/work/vim-plugins/labs', {'frozen': 1}) 66 | endif 67 | 68 | call dein#add('Shougo/dein.vim') 69 | 70 | function s:try(cmd) abort 71 | try 72 | execute a:cmd 73 | return 1 74 | catch 75 | return 0 76 | endtry 77 | endfunction 78 | 79 | " let s:use_deoplete = has('python3') && s:try('python3 import neovim') 80 | " call dein#add('Shougo/deoplete.nvim', {'if': s:use_deoplete}) 81 | " call dein#add('roxma/nvim-yarp', {'if': s:use_deoplete}) 82 | " call dein#add('roxma/vim-hug-neovim-rpc', {'if': s:use_deoplete}) 83 | " call dein#add('prabirshrestha/asyncomplete.vim') 84 | " call dein#add('prabirshrestha/asyncomplete-lsp.vim') 85 | call dein#add('prabirshrestha/vim-lsp') 86 | call dein#add('mattn/vim-lsp-settings') 87 | call dein#add('Shougo/context_filetype.vim') 88 | call dein#add('Shougo/neosnippet.vim') 89 | call dein#add('Shougo/neosnippet-snippets') 90 | call dein#add('Shougo/vimproc.vim', { 91 | \ 'build': 92 | \ has('mac') ? 'make -f make_mac.mak' : 93 | \ has('unix') ? 'make' : '' 94 | \ }) 95 | call dein#add('Shougo/vimfiler.vim') 96 | call dein#add('Shougo/unite.vim') 97 | call dein#add('Shougo/neomru.vim') 98 | call dein#add('Shougo/unite-build') 99 | call dein#add('Shougo/vinarise.vim') 100 | call dein#add('Shougo/echodoc', {'lazy': 1}) 101 | call dein#add('Shougo/unite-session', {'lazy': 1}) 102 | call dein#add('Shougo/unite-outline') 103 | 104 | call dein#add('AndrewRadev/linediff.vim') 105 | call dein#add('AndrewRadev/sideways.vim') 106 | call dein#add('vim-scripts/CSApprox', {'lazy': 1}) 107 | call dein#add('vim-scripts/Colour-Sampler-Pack', {'lazy': 1}) 108 | call dein#add('LeafCage/yankround.vim') 109 | call dein#add('easymotion/vim-easymotion') 110 | call dein#add('Rykka/colorv.vim', {'lazy': 1}) 111 | call dein#add('basyura/unite-rails') 112 | call dein#add('cohama/lexima.vim', {'on_event': 'InsertEnter'}) 113 | call dein#add('bootleq/vim-cycle', {'lazy': 1}) 114 | " call dein#add('deris/vim-duzzle', {'on_cmd': 'DuzzleStart'}) 115 | call dein#add('monaqa/vim-duzzle', {'on_cmd': 'DuzzleStart'}) 116 | call dein#add('deris/vim-operator-insert') 117 | call dein#add('deris/vim-rengbang') 118 | call dein#add('dietsche/vim-lastplace') 119 | call dein#add('eagletmt/onlinejudge-vim', {'lazy': 1}) 120 | call dein#add('emanon001/fclojure.vim', {'lazy': 1}) 121 | call dein#add('h1mesuke/vim-alignta') 122 | call dein#add('h1mesuke/vim-benchmark') 123 | call dein#add('haya14busa/vim-asterisk') 124 | call dein#add('haya14busa/vim-debugger') 125 | call dein#add('haya14busa/vim-edgemotion') 126 | call dein#add('haya14busa/vim-open-googletranslate') 127 | call dein#add('kana/vim-altr') 128 | call dein#add('kana/vim-fakeclip') 129 | call dein#add('kana/vim-gf-diff') 130 | call dein#add('kana/vim-gf-user') 131 | call dein#add('kana/vim-metarw', {'lazy': 1}) 132 | call dein#add('kana/vim-metarw-git') 133 | call dein#add('kana/vim-narrow', {'lazy': 1}) 134 | call dein#add('kana/vim-niceblock') 135 | call dein#add('kana/vim-operator-replace') 136 | call dein#add('kana/vim-operator-user') 137 | " call dein#add('kana/vim-repeat', {'lazy': 1}) 138 | call dein#add('kana/vim-smartchr') 139 | call dein#add('kana/vim-smartinput', {'lazy': 1}) 140 | call dein#add('kana/vim-smartword') 141 | " call dein#add('kana/vim-submode') 142 | call dein#add('kana/vim-textobj-datetime') 143 | call dein#add('kana/vim-textobj-diff') 144 | call dein#add('kana/vim-textobj-entire') 145 | call dein#add('kana/vim-textobj-fold') 146 | call dein#add('kana/vim-textobj-function') 147 | call dein#add('kana/vim-textobj-indent') 148 | call dein#add('kana/vim-textobj-jabraces') 149 | call dein#add('kana/vim-textobj-line') 150 | call dein#add('kana/vim-textobj-syntax') 151 | call dein#add('kana/vim-textobj-user') 152 | call dein#add('previm/previm', {'on_cmd': 'PrevimOpen', 'on_ft': ['markdown', 'textile']}) 153 | call dein#add('lambdalisue/vim-findent') 154 | call dein#add('lambdalisue/vim-gita') 155 | call dein#add('lambdalisue/vim-gina') 156 | call dein#add('lambdalisue/vim-gista') 157 | call dein#add('lambdalisue/vim-gista-unite') 158 | call dein#add('lambdalisue/vim-suda') 159 | call dein#add('lambdalisue/vim-mr') 160 | call dein#add('andymass/vim-matchup') 161 | call dein#add('machakann/vim-sandwich') 162 | call dein#add('mattn/calendar-vim') 163 | call dein#add('mattn/flappyvird-vim') 164 | call dein#add('mattn/gist-vim') 165 | call dein#add('mattn/ideone-vim') 166 | call dein#add('mattn/unite-advent_calendar') 167 | call dein#add('mattn/webapi-vim') 168 | call dein#add('mattn/wwwrenderer-vim') 169 | call dein#add('mfumi/ProjectEuler.vim', {'lazy': 1}) 170 | call dein#add('nathanaelkane/vim-indent-guides', {'lazy': 1}) 171 | call dein#add('osyo-manga/shabadou.vim') 172 | call dein#add('osyo-manga/unite-quickfix') 173 | call dein#add('osyo-manga/vim-automatic', {'lazy': 1}) 174 | call dein#add('osyo-manga/vim-budou', {'lazy': 1}) 175 | call dein#add('osyo-manga/vim-chained') 176 | call dein#add('osyo-manga/vim-over', {'lazy': 1}) 177 | call dein#add('osyo-manga/vim-precious', {'lazy': 1}) 178 | call dein#add('osyo-manga/vim-reanimate') 179 | call dein#add('osyo-manga/vim-reti') 180 | call dein#add('osyo-manga/vim-textobj-multitextobj') 181 | call dein#add('pocket7878/curses-vim') 182 | call dein#add('pocket7878/presen-vim', {'lazy': 1}) 183 | call dein#add('rbtnn/puyo.vim', {'on_cmd': 'Puyo'}) 184 | call dein#add('rbtnn/vimconsole.vim') 185 | call dein#add('rbtnn/vim-emphasiscursor') 186 | call dein#add('rhysd/clever-f.vim') 187 | " call dein#add('rhysd/committia.vim') 188 | call dein#add('thinca/committia.vim', {'rev': 'remove-dependence-on-vimproc'}) 189 | call dein#add('rhysd/github-complete.vim') 190 | call dein#add('rhysd/try-colorscheme.vim', {'on_cmd': 'TryColorscheme'}) 191 | call dein#add('rhysd/vim-grammarous') 192 | call dein#add('sgur/unite-qf') 193 | call dein#add('sgur/vim-gf-autoload') 194 | call dein#add('sgur/vim-textobj-parameter') 195 | call dein#add('mbbill/undotree', {'on_cmd': 'UndotreeToggle'}) 196 | call dein#add('soh335/unite-qflist') 197 | call dein#add('vim-scripts/squirrel.vim') 198 | call dein#add('syngan/vim-vimlint') 199 | call dein#add('t9md/vim-choosewin', {'lazy': 1}) 200 | call dein#add('t9md/vim-quickhl') 201 | call dein#add('thinca/vim-ambicmd') 202 | call dein#add('thinca/vim-befunge', {'on_cmd': 'Befunge'}) 203 | call dein#add('thinca/vim-blink1') 204 | call dein#add('thinca/vim-breadcrumbs') 205 | call dein#add('thinca/vim-editvar') 206 | call dein#add('thinca/vim-fontzoom') 207 | call dein#add('thinca/vim-ft-clojure') 208 | call dein#add('thinca/vim-ft-diff_fold') 209 | call dein#add('thinca/vim-ft-help_fold') 210 | call dein#add('thinca/vim-ft-markdown_fold') 211 | call dein#add('thinca/vim-ft-rst_header') 212 | call dein#add('thinca/vim-ft-svn_diff') 213 | call dein#add('thinca/vim-ft-vim_fold') 214 | call dein#add('thinca/vim-github') 215 | call dein#add('thinca/vim-ikaring', {'on_cmd': 'Ikaring'}) 216 | call dein#add('thinca/vim-localrc') 217 | call dein#add('thinca/vim-logcat', {'on_cmd': 'LogCat'}) 218 | call dein#add('thinca/vim-nind') 219 | call dein#add('thinca/vim-openbuf') 220 | call dein#add('thinca/vim-operator-sequence') 221 | call dein#add('thinca/vim-painter', {'lazy': 1}) 222 | call dein#add('thinca/vim-partedit') 223 | call dein#add('thinca/vim-plz_donate', {'lazy': 1}) 224 | call dein#add('thinca/vim-portal', {'lazy': 1}) 225 | call dein#add('thinca/vim-poslist') 226 | call dein#add('thinca/vim-prettyprint') 227 | call dein#add('thinca/vim-qfhl') 228 | call dein#add('thinca/vim-qfreplace') 229 | call dein#add('thinca/vim-quickmemo') 230 | call dein#add('thinca/vim-quickrun') 231 | call dein#add('thinca/vim-ref') 232 | call dein#add('thinca/vim-rtputil') 233 | call dein#add('thinca/vim-scall') 234 | call dein#add('thinca/vim-scouter') 235 | call dein#add('thinca/vim-showtime', {'rev': 'develop'}) 236 | call dein#add('thinca/vim-singleton', {'rev': 'develop'}) 237 | call dein#add('thinca/vim-splash', {'lazy': 1}) 238 | call dein#add('thinca/vim-submode', {'rev': 'my-master'}) 239 | call dein#add('thinca/vim-template') 240 | call dein#add('thinca/vim-textobj-between') 241 | call dein#add('thinca/vim-textobj-comment') 242 | call dein#add('thinca/vim-textobj-function-javascript') 243 | call dein#add('thinca/vim-textobj-function-perl') 244 | call dein#add('thinca/vim-themis', {'rev': 'develop'}) 245 | call dein#add('thinca/vim-threes', {'on_cmd': ['ThreesStart', 'ThreesShowRecord']}) 246 | call dein#add('thinca/vim-unite-history') 247 | call dein#add('thinca/vim-winenv') 248 | call dein#add('thinca/vim-wtrans') 249 | call dein#add('thinca/vim-zenspace') 250 | call dein#add('tpope/vim-repeat') 251 | call dein#add('tsukkee/lingr-vim') 252 | call dein#add('tsukkee/unite-help') 253 | call dein#add('tsukkee/unite-tag') 254 | call dein#add('4513ECHO/denops-gitter.vim') 255 | call dein#add('tyru/capture.vim') 256 | call dein#add('tyru/caw.vim') 257 | call dein#add('tyru/current-func-info.vim', {'lazy': 1}) 258 | call dein#add('tyru/emap.vim') 259 | call dein#add('tyru/nextfile.vim') 260 | call dein#add('tyru/open-browser.vim') 261 | call dein#add('tyru/open-browser-github.vim') 262 | call dein#add('tyru/operator-camelize.vim') 263 | call dein#add('tyru/operator-html-escape.vim') 264 | call dein#add('tyru/operator-reverse.vim') 265 | call dein#add('tyru/restart.vim') 266 | call dein#add('tyru/savemap.vim') 267 | call dein#add('tyru/simpletap.vim', {'lazy': 1}) 268 | call dein#add('tyru/vice.vim') 269 | call dein#add('ujihisa/neco-look') 270 | call dein#add('ujihisa/neoclojure.vim') 271 | call dein#add('ujihisa/ref-hoogle') 272 | call dein#add('ujihisa/shadow.vim') 273 | call dein#add('ujihisa/unite-colorscheme') 274 | call dein#add('ujihisa/unite-font') 275 | call dein#add('ujihisa/unite-locate') 276 | call dein#add('vim-scripts/uptime.vim') 277 | call dein#add('vim-jp/autofmt') 278 | call dein#add('vim-jp/vimdoc-ja') 279 | call dein#add('vim-jp/vital.vim', {'merged': 0}) 280 | call dein#add('vim-jp/vim-vimlparser') 281 | call dein#add('ynkdir/vim-funlib') 282 | call dein#add('y0za/vim-reading-vimrc') 283 | call dein#add('yomi322/neco-tweetvim') 284 | call dein#add('yomi322/unite-tweetvim') 285 | call dein#add('yomi322/vim-operator-suddendeath') 286 | call dein#add('obcat/vim-hitspop') 287 | call dein#add('junegunn/vim-easy-align', {'on_cmd': 'EasyAlign'}) 288 | 289 | call dein#add('tweekmonster/helpful.vim') 290 | 291 | call dein#add('itchyny/calendar.vim', {'lazy': 1, 'name': 'itchyny-calendar'}) 292 | 293 | call dein#add('vim-skk/eskk.vim') 294 | call dein#add('vim-skk/skkdict.vim') 295 | 296 | " denops 297 | call dein#add('vim-denops/denops.vim') 298 | call dein#add('vim-skk/skkeleton') 299 | 300 | call dein#add('Shougo/ddc.vim') 301 | call dein#add('Shougo/ddc-ui-pum') 302 | call dein#add('Shougo/pum.vim') 303 | call dein#add('matsui54/denops-popup-preview.vim') 304 | call dein#add('Shougo/ddc-source-around') 305 | call dein#add('matsui54/ddc-buffer') 306 | call dein#add('LumaKernel/ddc-source-file') 307 | call dein#add('octaltree/cmp-look') 308 | call dein#add('shun/ddc-source-vim-lsp') 309 | call dein#add('tani/ddc-fuzzy') 310 | call dein#add('Shougo/ddc-matcher_head') 311 | call dein#add('Shougo/ddc-sorter_rank') 312 | call dein#add('Shougo/ddc-converter_remove_overlap') 313 | 314 | call dein#add('Shougo/ddu.vim') 315 | call dein#add('Shougo/ddu-ui-ff') 316 | call dein#add('Shougo/ddu-kind-file') 317 | call dein#add('Shougo/ddu-filter-matcher_substring') 318 | call dein#add('Shougo/ddu-source-file_rec') 319 | call dein#add('matsui54/ddu-source-file_external') 320 | call dein#add('kuuote/ddu-source-mr') 321 | 322 | 323 | " For OmniSharp 324 | call dein#add('tpope/vim-dispatch', {'lazy': 1}) 325 | call dein#add('ctrlpvim/ctrlp.vim') 326 | call dein#add('junegunn/vader.vim', {'on_cmd': 'Vader'}) 327 | 328 | " Games 329 | call dein#add('katono/rogue.vim', {'on_cmd': ['Rogue', 'RogueScores', 'RogueRestore', 'RogueResume']}) 330 | call dein#add('vim/killersheep', {'on_cmd': ['KillKillKill']}) 331 | 332 | " filetype 333 | call dein#add('vim-python/python-syntax') 334 | call dein#add('othree/html5.vim') 335 | " My ghc-mod is broken... 336 | " call dein#add('eagletmt/ghcmod-vim', {'on_ft': 'haskell'}) 337 | call dein#add('kana/vim-filetype-haskell') 338 | call dein#add('ujihisa/neco-ghc', {'on_ft': 'haskell'}) 339 | call dein#add('derekwyatt/vim-scala', {'on_ft': 'scala'}) 340 | call dein#add('vim-scripts/groovyindent-unix') 341 | call dein#add('OmniSharp/omnisharp-vim', { 342 | \ 'on_ft': ['cs', 'csharp'], 343 | \ 'build': 344 | \ has('win32') ? 'omnisharp-roslyn/build.cmd' 345 | \ : 'bash omnisharp-roslyn/build.sh || true', 346 | \ }) 347 | call dein#add('kchmck/vim-coffee-script') 348 | call dein#add('elzr/vim-json') 349 | call dein#add('leafo/moonscript-vim') 350 | call dein#add('pangloss/vim-javascript') 351 | call dein#add('jsx/jsx.vim', {'on_ft': 'jsx'}) 352 | call dein#add('mattn/vim-goimports') 353 | call dein#add('zah/nimrod.vim') 354 | call dein#add('vim-scripts/jam.vim') 355 | call dein#add('Rykka/riv.vim', {'on_ft': 'rst'}) 356 | call dein#add('timcharper/textile.vim') 357 | call dein#add('kongo2002/fsharp-vim') 358 | " call dein#add('honza/dockerfile.vim', {'on_ft': 'dockerfile'}) 359 | call dein#add('rust-lang/rust.vim', {'on_ft': 'rust'}) 360 | call dein#add('racer-rust/vim-racer', {'on_ft': 'rust'}) 361 | call dein#add('elixir-lang/vim-elixir') 362 | call dein#add('leafgarland/typescript-vim') 363 | " call dein#add('peitalin/vim-jsx-typescript') 364 | call dein#add('Matt-Deacalion/vim-systemd-syntax') 365 | " call dein#add('vim-jp/vim-go-extra', {'on_ft': 'go'}) 366 | call dein#add('tmux-plugins/vim-tmux') 367 | call dein#add('cespare/vim-toml') 368 | call dein#add('udalov/kotlin-vim') 369 | call dein#add('rhysd/vim-gfm-syntax') 370 | call dein#add('jparise/vim-graphql') 371 | call dein#add('slim-template/vim-slim') 372 | call dein#add('pocke/rbs.vim') 373 | call dein#add('chr4/nginx.vim') 374 | call dein#add('nfnty/vim-nftables') 375 | call dein#add('rbtnn/vim-vimscript_indentexpr') 376 | call dein#add('hashivim/vim-terraform') 377 | call dein#add('gutenye/json5.vim') 378 | 379 | " colorscheme 380 | call dein#add('romainl/Apprentice') 381 | call dein#add('rhysd/vim-color-splatoon') 382 | call dein#add('gruvbox-community/gruvbox') 383 | 384 | " library 385 | call dein#add('haya14busa/vital-vimlcompiler') 386 | call dein#add('haya14busa/vital-power-assert') 387 | 388 | " Trial use 389 | call dein#add('machakann/vim-vimhelplint') 390 | 391 | if s:local_dein_exists 392 | execute 'source' fnameescape(s:local_dein) 393 | endif 394 | 395 | call dein#end() 396 | 397 | call dein#save_state() 398 | 399 | if dein#check_install() 400 | call dein#install() 401 | endif 402 | 403 | if !empty(map(dein#check_clean(), 'delete(v:val, "rf")')) 404 | call dein#recache_runtimepath() 405 | endif 406 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/dict/migemo/han2zen.dat: -------------------------------------------------------------------------------- 1 | # vi:set ts=8 sts=8 sw=8 tw=0: 2 | # 3 | # han2zen.dat - 半角→全角変換表 4 | # 5 | # Last Change: 18-Jun-2009. 6 | # Written By: Muraoka Taro 7 | 8 | # 漢字コードの違いもこの変換表で吸収する。 9 | 10 | # 半角→全角スペース変換はデリミタをisspace()で定義してしまったのでできてい 11 | # ない。 12 | #   13 | ! ! 14 | " ” 15 | # シャープの変換はコメントとみなされるのでできていない。 16 | # # 17 | $ $ 18 | % % 19 | & & 20 | ' ’ 21 | ( ( 22 | ) ) 23 | * * 24 | + + 25 | , , 26 | - - 27 | . . 28 | / / 29 | 0 0 30 | 1 1 31 | 2 2 32 | 3 3 33 | 4 4 34 | 5 5 35 | 6 6 36 | 7 7 37 | 8 8 38 | 9 9 39 | : : 40 | ; ; 41 | < < 42 | = = 43 | > > 44 | ? ? 45 | 46 | @ @ 47 | A A 48 | B B 49 | C C 50 | D D 51 | E E 52 | F F 53 | G G 54 | H H 55 | I I 56 | J J 57 | K K 58 | L L 59 | M M 60 | N N 61 | O O 62 | P P 63 | Q Q 64 | R R 65 | S S 66 | T T 67 | U U 68 | V V 69 | W W 70 | X X 71 | Y Y 72 | Z Z 73 | [ [ 74 | \ ¥ 75 | ] ] 76 | ^ ^ 77 | _ _ 78 | 79 | ` ‘ 80 | a a 81 | b b 82 | c c 83 | d d 84 | e e 85 | f f 86 | g g 87 | h h 88 | i i 89 | j j 90 | k k 91 | l l 92 | m m 93 | n n 94 | o o 95 | p p 96 | q q 97 | r r 98 | s s 99 | t t 100 | u u 101 | v v 102 | w w 103 | x x 104 | y y 105 | z z 106 | { { 107 | | | 108 | } } 109 | ~ ~ 110 | 111 | 。 。 112 | 「 「 113 | 」 」 114 | 、 、 115 | ・ ・ 116 | ヲ ヲ 117 | ァ ァ 118 | ィ ィ 119 | ゥ ゥ 120 | ェ ェ 121 | ォ ォ 122 | ャ ャ 123 | ュ ュ 124 | ョ ョ 125 | ッ ッ 126 | ー ー 127 | ア ア 128 | イ イ 129 | ウ ウ 130 | エ エ 131 | オ オ 132 | カ カ 133 | キ キ 134 | ク ク 135 | ケ ケ 136 | コ コ 137 | サ サ 138 | シ シ 139 | ス ス 140 | セ セ 141 | ソ ソ 142 | 143 | タ タ 144 | チ チ 145 | ツ ツ 146 | テ テ 147 | ト ト 148 | ナ ナ 149 | ニ ニ 150 | ヌ ヌ 151 | ネ ネ 152 | ノ ノ 153 | ハ ハ 154 | ヒ ヒ 155 | フ フ 156 | ヘ ヘ 157 | ホ ホ 158 | マ マ 159 | ミ ミ 160 | ム ム 161 | メ メ 162 | モ モ 163 | ヤ ヤ 164 | ユ ユ 165 | ヨ ヨ 166 | ラ ラ 167 | リ リ 168 | ル ル 169 | レ レ 170 | ロ ロ 171 | ワ ワ 172 | ン ン 173 | ゙ ゛ 174 | ゚ ゜ 175 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/dict/migemo/hira2kata.dat: -------------------------------------------------------------------------------- 1 | # vi:set ts=8 sts=8 sw=8 tw=0: 2 | # 3 | # hira2kata.dat - 平仮名→カタカナ変換表 4 | # 5 | # Last Change: 18-Jun-2009. 6 | # Written By: Muraoka Taro 7 | 8 | # 漢字コードの違いもこの変換表で吸収する。 9 | 10 | あ ア 11 | い イ 12 | う ウ 13 | え エ 14 | お オ 15 | 16 | か カ 17 | き キ 18 | く ク 19 | け ケ 20 | こ コ 21 | 22 | さ サ 23 | し シ 24 | す ス 25 | せ セ 26 | そ ソ 27 | 28 | た タ 29 | ち チ 30 | つ ツ 31 | て テ 32 | と ト 33 | 34 | な ナ 35 | に ニ 36 | ぬ ヌ 37 | ね ネ 38 | の ノ 39 | 40 | は ハ 41 | ひ ヒ 42 | ふ フ 43 | へ ヘ 44 | ほ ホ 45 | 46 | ま マ 47 | み ミ 48 | む ム 49 | め メ 50 | も モ 51 | 52 | や ヤ 53 | ゆ ユ 54 | よ ヨ 55 | 56 | ら ラ 57 | り リ 58 | る ル 59 | れ レ 60 | ろ ロ 61 | 62 | わ ワ 63 | ゐ ヰ 64 | ゑ ヱ 65 | を ヲ 66 | 67 | が ガ 68 | ぎ ギ 69 | ぐ グ 70 | げ ゲ 71 | ご ゴ 72 | 73 | ざ ザ 74 | じ ジ 75 | ず ズ 76 | ぜ ゼ 77 | ぞ ゾ 78 | 79 | だ ダ 80 | ぢ ヂ 81 | づ ヅ 82 | で デ 83 | ど ド 84 | 85 | ば バ 86 | び ビ 87 | ぶ ブ 88 | べ ベ 89 | ぼ ボ 90 | 91 | ぱ パ 92 | ぴ ピ 93 | ぷ プ 94 | ぺ ペ 95 | ぽ ポ 96 | 97 | ぁ ァ 98 | ぃ ィ 99 | ぅ ゥ 100 | ぇ ェ 101 | ぉ ォ 102 | 103 | ゃ ャ 104 | ゅ ュ 105 | ょ ョ 106 | 107 | ん ン 108 | っ ッ 109 | ゎ ヮ 110 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/dict/migemo/roma2hira.dat: -------------------------------------------------------------------------------- 1 | # vi:set ts=8 sts=8 sw=8 tw=0: 2 | # 3 | # roma2hira.dat - ローマ字→平仮名変換表 4 | # 5 | # Last Change: 18-Jun-2009. 6 | # Written By: Muraoka Taro 7 | 8 | # こいつをカスタマイズすることでローマ字の入力方式が変わります。 9 | # 現在はMS-IME2000を参考に決定しています。 10 | # 漢字コードの違いを吸収する役割も果たします。 11 | # xnとxtuには「ん」と「っ」を指定する役割があります。 12 | # {from} {to}の形式です。 13 | # 現在は{from}は最大7バイトまで{to}は6バイトまでとなっています。 14 | # {from}と{to}の間は空白文字(isspace())で区切ります。 15 | 16 | a あ 17 | i い 18 | u う 19 | e え 20 | o お 21 | 22 | ka か 23 | ki き 24 | ku く 25 | ke け 26 | ko こ 27 | 28 | sa さ 29 | si し 30 | su す 31 | se せ 32 | so そ 33 | 34 | ta た 35 | ti ち 36 | tu つ 37 | te て 38 | to と 39 | 40 | na な 41 | ni に 42 | nu ぬ 43 | ne ね 44 | no の 45 | 46 | ha は 47 | hi ひ 48 | hu ふ 49 | he へ 50 | ho ほ 51 | 52 | ma ま 53 | mi み 54 | mu む 55 | me め 56 | mo も 57 | 58 | ya や 59 | yi い 60 | yu ゆ 61 | ye いぇ 62 | yo よ 63 | 64 | ra ら 65 | ri り 66 | ru る 67 | re れ 68 | ro ろ 69 | 70 | wa わ 71 | wi ゐ 72 | wu う 73 | we ゑ 74 | wo を 75 | 76 | 77 | ga が 78 | gi ぎ 79 | gu ぐ 80 | ge げ 81 | go ご 82 | 83 | za ざ 84 | zi じ 85 | zu ず 86 | ze ぜ 87 | zo ぞ 88 | 89 | da だ 90 | di ぢ 91 | du づ 92 | de で 93 | do ど 94 | 95 | ba ば 96 | bi び 97 | bu ぶ 98 | be べ 99 | bo ぼ 100 | 101 | pa ぱ 102 | pi ぴ 103 | pu ぷ 104 | pe ぺ 105 | po ぽ 106 | 107 | 108 | la ぁ 109 | li ぃ 110 | lu ぅ 111 | le ぇ 112 | lo ぉ 113 | 114 | lya ゃ 115 | lyi ぃ 116 | lyu ゅ 117 | lye ぇ 118 | lyo ょ 119 | 120 | xa ぁ 121 | xi ぃ 122 | xu ぅ 123 | xe ぇ 124 | xo ぉ 125 | 126 | xya ゃ 127 | xyi ぃ 128 | xyu ゅ 129 | xye ぇ 130 | xyo ょ 131 | 132 | kya きゃ 133 | kyi きぃ 134 | kyu きゅ 135 | kye きぇ 136 | kyo きょ 137 | 138 | gwa ぐぁ 139 | gwi ぐぃ 140 | gwu ぐぅ 141 | gwe ぐぇ 142 | gwo ぐぉ 143 | 144 | gya ぎゃ 145 | gyi ぎぃ 146 | gyu ぎゅ 147 | gye ぎぇ 148 | gyo ぎょ 149 | 150 | sha しゃ 151 | shi し 152 | shu しゅ 153 | she しぇ 154 | sho しょ 155 | 156 | swa すぁ 157 | swi すぃ 158 | swu すぅ 159 | swe すぇ 160 | swo すぉ 161 | 162 | sya しゃ 163 | syi しぃ 164 | syu しゅ 165 | sye しぇ 166 | syo しょ 167 | 168 | tha てゃ 169 | thi てぃ 170 | thu てゅ 171 | the てぇ 172 | tho てょ 173 | 174 | tsa つぁ 175 | tsi つぃ 176 | tsu つ 177 | tse つぇ 178 | tso つぉ 179 | 180 | twa とぁ 181 | twi とぃ 182 | twu とぅ 183 | twe とぇ 184 | two とぉ 185 | 186 | tya ちゃ 187 | tyi ちぃ 188 | tyu ちゅ 189 | tye ちぇ 190 | tyo ちょ 191 | 192 | 193 | nya にゃ 194 | nyi にぃ 195 | nyu にゅ 196 | nye にぇ 197 | nyo にょ 198 | 199 | hya ひゃ 200 | hyi ひぃ 201 | hyu ひゅ 202 | hye ひぇ 203 | hyo ひょ 204 | 205 | bya びゃ 206 | byi びぃ 207 | byu びゅ 208 | bye びぇ 209 | byo びょ 210 | 211 | pya ぴゃ 212 | pyi ぴぃ 213 | pyu ぴゅ 214 | pye ぴぇ 215 | pyo ぴょ 216 | 217 | mya みゃ 218 | myi みぃ 219 | myu みゅ 220 | mye みぇ 221 | myo みょ 222 | 223 | rya りゃ 224 | ryi りぃ 225 | ryu りゅ 226 | rye りぇ 227 | ryo りょ 228 | 229 | 230 | ca か 231 | ci し 232 | cu く 233 | ce せ 234 | co こ 235 | 236 | cha ちゃ 237 | chi ち 238 | chu ちゅ 239 | che ちぇ 240 | cho ちょ 241 | 242 | fa ふぁ 243 | fi ふぃ 244 | fu ふ 245 | fe ふぇ 246 | fo ふぉ 247 | 248 | fwa ふぁ 249 | fwi ふぃ 250 | fwu ふぅ 251 | fwe ふぇ 252 | fwo ふぉ 253 | 254 | fya ふゃ 255 | fyi ふぃ 256 | fyu ふゅ 257 | fye ふぇ 258 | fyo ふょ 259 | 260 | ja じゃ 261 | ji じ 262 | ju じゅ 263 | je じぇ 264 | jo じょ 265 | 266 | jya じゃ 267 | jyi じぃ 268 | jyu じゅ 269 | jye じぇ 270 | jyo じょ 271 | 272 | qa くぁ 273 | qi くぃ 274 | qu く 275 | qe くぇ 276 | qo くぉ 277 | 278 | qwa くぁ 279 | qwi くぃ 280 | qwu くぅ 281 | qwe くぇ 282 | qwo くぉ 283 | 284 | qya くゃ 285 | qyi くぃ 286 | qyu くゅ 287 | qye くぇ 288 | qyo くょ 289 | 290 | va ヴぁ 291 | vi ヴぃ 292 | vu ヴ 293 | ve ヴぇ 294 | vo ヴぉ 295 | 296 | vya ヴゃ 297 | vyi ヴぃ 298 | vyu ヴゅ 299 | vye ヴぇ 300 | vyo ヴょ 301 | 302 | 303 | nn ん 304 | n' ん 305 | xn ん 306 | ltu っ 307 | xtu っ 308 | lwa ゎ 309 | xwa ゎ 310 | lka ヵ 311 | xka ヵ 312 | lke ヶ 313 | xke ヶ 314 | kwa くぁ 315 | 316 | - ー 317 | ~ ~ 318 | #, 、 319 | #. 。 320 | #[ 「 321 | #] 」 322 | 323 | 324 | mba んば 325 | mbi んび 326 | mbu んぶ 327 | mbe んべ 328 | mbo んぼ 329 | 330 | mpa んぱ 331 | mpi んぴ 332 | mpu んぷ 333 | mpe んぺ 334 | mpo んぽ 335 | 336 | mma んま 337 | mmi んみ 338 | mmu んむ 339 | mme んめ 340 | mmo んも 341 | 342 | tcha っちゃ 343 | tchi っち 344 | tchu っちゅ 345 | tche っちぇ 346 | tcho っちょ 347 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/dict/skk/SKK-JISYO.euc-jp.L: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thinca/config/748c788067601e3fcb2282449a5417ea3c73d1f2/dotfiles/dot.vim/dict/skk/SKK-JISYO.euc-jp.L -------------------------------------------------------------------------------- /dotfiles/dot.vim/pack/personal/start/default/after/ftplugin/ant.vim: -------------------------------------------------------------------------------- 1 | SetUndoFtplugin setl iskeyword< 2 | 3 | setlocal iskeyword+=. 4 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/pack/personal/start/default/after/ftplugin/c.vim: -------------------------------------------------------------------------------- 1 | SetUndoFtplugin setl et< ts< sw< 2 | SetUndoFtplugin silent! nunmap 3 | 4 | setlocal noexpandtab tabstop=4 shiftwidth=4 5 | 6 | let b:alignta_default_arguments = '12 \w\+\%(\[\S\+\]\)\?[;,]' 7 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/pack/personal/start/default/after/ftplugin/calendar.vim: -------------------------------------------------------------------------------- 1 | if exists(':Setlocal') == 2 2 | Setlocal whichwrap=b,s,<,>,[,],h,l 3 | endif 4 | nunmap 5 | nunmap 6 | nmap < CalendarGotoPrevMonth 7 | nmap > CalendarGotoNextMonth 8 | nmap q CalendarClose 9 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/pack/personal/start/default/after/ftplugin/clojure.vim: -------------------------------------------------------------------------------- 1 | SetUndoFtplugin setl cin< et< cms< 2 | SetUndoFtplugin iunmap ( 3 | SetUndoFtplugin iunmap ) 4 | SetUndoFtplugin iunmap 5 | SetUndoFtplugin iunmap 6 | SetUndoFtplugin iunmap 7 | 8 | setlocal shiftwidth=2 9 | setlocal nocindent expandtab commentstring=;\ %s 10 | setlocal omnifunc=neoclojure#complete 11 | 12 | function s:get_syntax_name() 13 | let col = col('.') 14 | if col == col('$') 15 | let col -= 1 16 | endif 17 | return synIDattr(synIDtrans(synID(line("."), col, 1)), 'name') 18 | endfunction 19 | 20 | function s:is_disable_pare_assist() 21 | let synname = s:get_syntax_name() 22 | return synname ==? 'Constant' || synname ==? 'Comment' 23 | endfunction 24 | 25 | function s:pair_char(char) 26 | return get({ 27 | \ '(': ')', '{': '}', '[': ']', 28 | \ ')': '(', '}': '{', ']': '[', 29 | \ }, a:char, '') 30 | endfunction 31 | 32 | function s:prev_char() 33 | return getline('.')[col('.') - 2] 34 | endfunction 35 | 36 | function s:next_char() 37 | return getline('.')[col('.') - 1] 38 | endfunction 39 | 40 | function s:overwrap_pare(left, right) 41 | let next = s:next_char() 42 | let g:next = next 43 | let g:disable = s:is_disable_pare_assist() 44 | if s:is_disable_pare_assist() 45 | return a:left 46 | elseif next =~# '^[({[]$' 47 | return printf("%s\%%\%s\%%a", a:left, a:right) 48 | elseif next =~# '\k' 49 | return printf("\ea%s\\b%s", a:right, a:left) 50 | endif 51 | return a:left . a:right . "\" 52 | endfunction 53 | 54 | function s:skip_close_pare(defkey, altkey, char) 55 | if !s:is_disable_pare_assist() && s:next_char() ==# a:char 56 | return a:altkey 57 | endif 58 | return a:defkey 59 | endfunction 60 | 61 | function s:wrap_tab() 62 | let tab = TabWrapper() 63 | if s:is_disable_pare_assist() || 64 | \ tab ==# "\(neosnippet_expand_or_jump)" 65 | return tab 66 | endif 67 | let ch = s:next_char() 68 | if ch =~# '^[({[]$' 69 | return "\%\" 70 | elseif ch =~# '^[]})]$' 71 | return s:skip_close_pare(tab, "\", ch) 72 | endif 73 | return tab 74 | endfunction 75 | 76 | function s:del_pare(defkey) 77 | let prev = s:prev_char() 78 | if !s:is_disable_pare_assist() 79 | if prev =~# '^[({[]$' 80 | return a:defkey . s:skip_close_pare('', "\", s:pair_char(prev)) 81 | elseif prev =~# '^[]})]$' 82 | " TODO 83 | endif 84 | endif 85 | return a:defkey 86 | endfunction 87 | 88 | function s:smart_space(key) 89 | let prev = s:prev_char() 90 | let next = s:next_char() 91 | if prev ==# ' ' && next !=# ' ' 92 | return a:key . "\" 93 | endif 94 | return a:key 95 | endfunction 96 | 97 | 98 | inoremap ( overwrap_pare('(', ')') 99 | inoremap [ overwrap_pare('[', ']') 100 | inoremap { overwrap_pare('{', '}') 101 | 102 | imap wrap_tab() 103 | 104 | inoremap ) skip_close_pare(')', "\", ')') 105 | inoremap ] skip_close_pare(']', "\", ']') 106 | inoremap } skip_close_pare('}', "\", '}') 107 | 108 | inoremap del_pare("\") 109 | 110 | inoremap smart_space(' ') 111 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/pack/personal/start/default/after/ftplugin/coffee.vim: -------------------------------------------------------------------------------- 1 | SetUndoFtplugin setl et< ts< sts< sw< 2 | 3 | setlocal expandtab tabstop=2 softtabstop=2 shiftwidth=2 4 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/pack/personal/start/default/after/ftplugin/cs.vim: -------------------------------------------------------------------------------- 1 | function GetCsFold(lnum) 2 | let line = getline(v:lnum) 3 | if line =~# '^\s*#region' 4 | return 'a1' 5 | elseif line =~# '^\s*#endregion' 6 | return 's1' 7 | endif 8 | return '=' 9 | endfunction 10 | 11 | setlocal foldmethod=expr foldexpr=GetCsFold(v:lnum) 12 | 13 | let b:caw_oneline_comment = '//' 14 | 15 | if empty(globpath(&runtimepath, 'autoload/OmniSharp.vim')) 16 | finish 17 | end 18 | 19 | nnoremap :OmniSharpRename 20 | nnoremap :OmniSharpTypeLookup 21 | nnoremap :OmniSharpReloadSolution 22 | nnoremap :OmniSharpBuild 23 | nnoremap :OmniSharpFindImplementations 24 | nnoremap :OmniSharpGotoDefinition 25 | nnoremap :OmniSharpFindUsages 26 | 27 | nnoremap K :OmniSharpDocumentation 28 | 29 | nnoremap ma :OmniSharpAddToProject 30 | nnoremap mb :OmniSharpBuild 31 | nnoremap mc :OmniSharpFindSyntaxErrors 32 | nnoremap mf :OmniSharpCodeFormat 33 | nnoremap mj :OmniSharpGotoDefinition 34 | nnoremap mj s:OmniSharpGotoDefinition 35 | nnoremap mi :OmniSharpFindImplementations 36 | nnoremap mr :OmniSharpRename 37 | nnoremap mt :OmniSharpTypeLookup 38 | nnoremap mu :OmniSharpFindUsages 39 | nnoremap mx :OmniSharpGetCodeActions 40 | 41 | nnoremap gd :OmniSharpGotoDefinition 42 | nnoremap gd s:OmniSharpGotoDefinition 43 | nnoremap gr :OmniSharpFindUsages 44 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/pack/personal/start/default/after/ftplugin/css.vim: -------------------------------------------------------------------------------- 1 | SetUndoFtplugin setl iskeyword< 2 | 3 | setlocal iskeyword+=- 4 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/pack/personal/start/default/after/ftplugin/csv.vim: -------------------------------------------------------------------------------- 1 | SetUndoFtplugin setl wrap< 2 | SetUndoFtplugin unlet! b:alignta_default_arguments 3 | 4 | setlocal nowrap 5 | let b:alignta_default_arguments = '@01 ,' 6 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/pack/personal/start/default/after/ftplugin/diff.vim: -------------------------------------------------------------------------------- 1 | SetUndoFtplugin setl inex< 2 | 3 | let &l:includeexpr = 'filereadable(v:fname) || isdirectory(v:fname) ? v:fname : substitute(v:fname, "^[ab]/", "", "")' 4 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/pack/personal/start/default/after/ftplugin/dockerfile.vim: -------------------------------------------------------------------------------- 1 | function s:head(str) 2 | let col = col('.') 3 | let head = matchstr(getline('.'), '\c^\s*\%(ONBUILD\s\+\)\?') 4 | let col -= len(head) 5 | if col - 2 < len(a:str) 6 | return toupper(a:str) 7 | endif 8 | return a:str 9 | endfunction 10 | 11 | for s:instruction in [ 12 | \ 'from', 13 | \ 'run', 14 | \ 'cmd', 15 | \ 'label', 16 | \ 'maintainer', 17 | \ 'expose', 18 | \ 'env', 19 | \ 'add', 20 | \ 'copy', 21 | \ 'entrypoint', 22 | \ 'volume', 23 | \ 'user', 24 | \ 'workdir', 25 | \ 'arg', 26 | \ 'onbuild', 27 | \ 'stopsignal', 28 | \ 'healthcheck', 29 | \ 'shell', 30 | \ ] 31 | execute 'inoreabbrev ' 32 | \ s:instruction 33 | \ printf('head(%s)', string(s:instruction)) 34 | endfor 35 | 36 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/pack/personal/start/default/after/ftplugin/dosbatch.vim: -------------------------------------------------------------------------------- 1 | if &l:fileencoding !=# 'cp932' || &l:fileformat !=# 'dos' 2 | setlocal fileencoding=cp932 fileformat=dos 3 | if search('[^\x00-\x7F]', 'cnw') 4 | setlocal modified 5 | endif 6 | endif 7 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/pack/personal/start/default/after/ftplugin/exrename.vim: -------------------------------------------------------------------------------- 1 | silent! nunmap q 2 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/pack/personal/start/default/after/ftplugin/gitcommit.vim: -------------------------------------------------------------------------------- 1 | if &l:modifiable && (&l:fileencoding !=# 'utf-8' || &l:fileformat !=# 'unix') 2 | setlocal fileencoding=utf-8 fileformat=unix 3 | setlocal modified 4 | endif 5 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/pack/personal/start/default/after/ftplugin/gitconfig.vim: -------------------------------------------------------------------------------- 1 | SetUndoFtplugin setl et< 2 | 3 | setlocal noexpandtab 4 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/pack/personal/start/default/after/ftplugin/go.vim: -------------------------------------------------------------------------------- 1 | SetUndoFtplugin setlocal et< 2 | 3 | compiler go 4 | setlocal noexpandtab 5 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/pack/personal/start/default/after/ftplugin/haskell.vim: -------------------------------------------------------------------------------- 1 | SetUndoFtplugin setl ts< sw< sts< sta< et< ai< inc< inex< sua< 2 | SetUndoFtplugin autocmd! custom-ftplugin-haskell * 3 | 4 | setlocal tabstop=8 shiftwidth=2 softtabstop=2 smarttab expandtab autoindent 5 | setlocal include=^import 6 | setlocal includeexpr=substitute(v:fname,'\\.','/','g') 7 | setlocal suffixesadd=.hs 8 | 9 | " compiler ghc 10 | 11 | augroup custom-ftplugin-haskell 12 | autocmd! * 13 | autocmd BufWritePost silent! lmake! -c "%" 14 | augroup END 15 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/pack/personal/start/default/after/ftplugin/help.vim: -------------------------------------------------------------------------------- 1 | scriptencoding utf-8 2 | 3 | SetUndoFtplugin setlocal kp< 4 | setlocal keywordprg=:help 5 | 6 | SetUndoFtplugin silent! nunmap 7 | SetUndoFtplugin silent! vunmap 8 | SetUndoFtplugin silent! nunmap 9 | SetUndoFtplugin silent! vunmap 10 | nnoremap zv 11 | vnoremap zv 12 | nnoremap 13 | vnoremap 14 | 15 | function s:option_to_view() 16 | setlocal buftype=help nomodifiable readonly 17 | setlocal nolist 18 | if exists('+colorcolumn') 19 | setlocal colorcolumn= 20 | endif 21 | if has('conceal') 22 | setlocal conceallevel=2 23 | endif 24 | endfunction 25 | 26 | function s:option_to_edit() 27 | setlocal buftype= modifiable noreadonly 28 | setlocal list tabstop=8 shiftwidth=8 softtabstop=8 noexpandtab textwidth=78 29 | if exists('+colorcolumn') 30 | setlocal colorcolumn=+1 31 | endif 32 | if has('conceal') 33 | setlocal conceallevel=0 34 | endif 35 | endfunction 36 | 37 | command! -buffer -bar HelpEdit call s:option_to_edit() 38 | command! -buffer -bar HelpView call s:option_to_view() 39 | 40 | nnoremap 41 | \ ":\Help" . (&l:buftype == '' ? 'View' : 'Edit') . "\" 42 | 43 | 44 | 45 | let s:pattern_link = '|[^ |]\+|' 46 | let s:pattern_option = '''[A-Za-z0-9_-]\{2,}''' 47 | let s:pattern_any = join([s:pattern_link, s:pattern_option], '\|') 48 | 49 | " J/K are experimental keys. 50 | " call textobj#user#plugin('help', { 51 | \ 'any': { 52 | \ '*pattern*': s:pattern_any, 53 | \ 'move-n': ' j', 54 | \ 'move-p': ' k', 55 | \ 'move-N': ' J', 56 | \ 'move-P': ' K', 57 | \ }, 58 | \ 'link': { 59 | \ '*pattern*': s:pattern_link, 60 | \ 'move-n': ' f', 61 | \ 'move-p': ' r', 62 | \ 'move-N': ' F', 63 | \ 'move-P': ' R', 64 | \ }, 65 | \ 'option': { 66 | \ '*pattern*': s:pattern_option, 67 | \ 'move-n': ' d', 68 | \ 'move-p': ' e', 69 | \ 'move-N': ' D', 70 | \ 'move-P': ' E', 71 | \ }, 72 | \ }) 73 | if &buftype ==# 'help' 74 | map J (textobj-help-any-n) 75 | map K (textobj-help-any-p) 76 | endif 77 | 78 | 79 | 80 | if &buftype ==# 'help' 81 | finish 82 | endif 83 | 84 | " in editing 85 | SetUndoFtplugin setlocal ts< sw< sts< et< cc< tw=78 86 | SetUndoFtplugin delcommand GenerateContents 87 | SetUndoFtplugin unlet! b:smart_expandtab 88 | call s:option_to_edit() 89 | 90 | command! -buffer -bar GenerateContents call s:generate_contents() 91 | function s:generate_contents() 92 | let cursor = getpos('.') 93 | 94 | let file_name = matchstr(expand('%:p:r:gs?\\?/?'), '.*/doc/\zs.*') 95 | let plug_name = substitute(file_name, '/', '-', 'g') 96 | let ja = expand('%:e') ==? 'jax' 97 | 1 98 | 99 | if search('-contents\*$', 'W') 100 | silent .+1;/^=\{78}$/-1 delete _ 101 | .-1 102 | put ='' 103 | else 104 | keeppatterns /^License:\|Maintainer:/+1 105 | let header = printf('%s%s*%s-contents*', (ja ? "目次\t" : 'CONTENTS'), 106 | \ repeat("\t", 5), plug_name) 107 | silent put =[repeat('=', 78), header, ''] 108 | endif 109 | 110 | let contents_pos = getpos('.') 111 | 112 | let lines = [] 113 | while search('^\([=-]\)\1\{77}$', 'W') 114 | let head = getline('.') =~# '=' ? '' : ' ' 115 | .+1 116 | let caption = matchlist(getline('.'), '^\([^\t]*\)\t\+\*\(\S*\)\*$') 117 | if !empty(caption) 118 | let [title, tag] = caption[1 : 2] 119 | call add(lines, printf("%s%s\t%s|%s|", head, title, head, tag)) 120 | endif 121 | endwhile 122 | 123 | call setpos('.', contents_pos) 124 | 125 | silent put =lines + repeat([''], 3) 126 | call setpos('.', contents_pos) 127 | let len = len(lines) 128 | setlocal expandtab tabstop=32 129 | execute '.,.+' . len . 'retab' 130 | setlocal noexpandtab tabstop=8 131 | execute '.,.+' . len . 'retab!' 132 | 133 | call setpos('.', cursor) 134 | endfunction 135 | 136 | function s:get_text_on_cursor(pat) 137 | let line = getline('.') 138 | let pos = col('.') 139 | let s = 0 140 | while s < pos 141 | let [s, e] = [match(line, a:pat, s), matchend(line, a:pat, s)] 142 | if s < 0 143 | break 144 | elseif s < pos && pos <= e 145 | return line[s : e - 1] 146 | endif 147 | let s += 1 148 | endwhile 149 | return '' 150 | endfunction 151 | 152 | function s:jump_to_tag() abort 153 | let tag = s:get_text_on_cursor('|\zs[^|]\+\ze|') 154 | if tag !=# '' 155 | let pat = escape(tag, '\') 156 | if !search('\V*\zs' . pat . '*', 'w') 157 | execute 'help' tag 158 | endif 159 | endif 160 | endfunction 161 | nnoremap :call jump_to_tag() 162 | 163 | let b:smart_expandtab = 0 164 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/pack/personal/start/default/after/ftplugin/html.vim: -------------------------------------------------------------------------------- 1 | SetUndoFtplugin setl et< isk< 2 | 3 | if &l:filetype =~? '^\%(x\?html\|eruby\)$' " It is not PHP, or others. 4 | setlocal expandtab iskeyword+=- 5 | endif 6 | 7 | let b:match_words .= ',{:},(:)' 8 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/pack/personal/start/default/after/ftplugin/int-clj.vim: -------------------------------------------------------------------------------- 1 | runtime! ftplugin/clojure.vim 2 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/pack/personal/start/default/after/ftplugin/int-termtter.vim: -------------------------------------------------------------------------------- 1 | match Error /\c\/ 2 | 2match Todo /\cvim/ 3 | 4 | augroup custom-int-termtter 5 | autocmd! 6 | autocmd CursorMovedI,InsertLeave let b:statusline_extra = s:count() 7 | augroup END 8 | 9 | let s:pat = '^>\s\+u\%(pdate\)\?\>\s*\zs.*$' 10 | function s:count() 11 | let l = getline('$') 12 | if l !~# s:pat 13 | return '' 14 | endif 15 | let num = len(substitute(matchstr(l, s:pat), '.', 'x', 'g')) 16 | return '[' . (140 - num) . ']' 17 | endfunction 18 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/pack/personal/start/default/after/ftplugin/irb.vim: -------------------------------------------------------------------------------- 1 | SetUndoFtplugin setl buftype< 2 | SetUndoFtplugin iunmap 3 | SetUndoFtplugin iunmap 4 | SetUndoFtplugin unlet! b:irb_pos b:irb_eval b:popup_close 5 | 6 | runtime! syntax/ruby.vim indent/ruby.vim ftplugin/ruby.vim ftplugin/ruby_*.vim ftplugin/ruby/*.vim 7 | setl buftype=nofile indentexpr=GetRubyIndent() 8 | 9 | function s:closePopup() 10 | let b:popup_close = pumvisible() 11 | return "\" 12 | endfunction 13 | 14 | function s:evalRuby() 15 | if b:popup_close 16 | return '' 17 | endif 18 | let b:irb_eval .= getline(line('.') - 1) . "\n" 19 | if indent('.') == 0 20 | try 21 | ruby $curbuf.line = "=> " + eval(VIM::evaluate('b:irb_eval')).inspect 22 | catch 23 | d 24 | call append(line('.'), '# ' . v:exception) 25 | normal! j 26 | endtry 27 | let b:irb_eval = '' 28 | return "\o\0Di" 29 | endif 30 | return '' 31 | endfunction 32 | 33 | let b:irb_eval = '' 34 | 35 | inoremap A=closePopup()=evalRuby() 36 | inoremap :%d _ 37 | 38 | startinsert 39 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/pack/personal/start/default/after/ftplugin/java.vim: -------------------------------------------------------------------------------- 1 | SetUndoFtplugin setlocal ofu< cfu< efm< mp< 2 | SetUndoFtplugin autocmd! custom-ftplugin-java * 3 | 4 | setlocal include=^import 5 | 6 | " Avoid jsp. 7 | if &l:filetype == 'java' 8 | compiler javac 9 | endif 10 | 11 | function s:makeOption() 12 | let opt = ' ' 13 | if exists('b:classpath') 14 | let opt .= '-classpath ' . b:classpath . ' ' 15 | elseif exists('g:classpath') 16 | let opt .= '-classpath ' . g:classpath . ' ' 17 | endif 18 | let fenc = &fenc == '' ? &enc : &fenc 19 | let opt .= '-encoding ' . fenc . ' ' 20 | return opt 21 | endfunction 22 | 23 | function s:quickfixEncode() 24 | if &termencoding == '' || &termencoding ==# &encoding 25 | return 26 | endif 27 | let list = getloclist(0) 28 | if empty(list) 29 | return 30 | endif 31 | for d in list 32 | let d.text = iconv(d.text, &termencoding, &encoding) 33 | endfor 34 | call setloclist(0, list) 35 | endfunction 36 | 37 | augroup custom-ftplugin-java 38 | autocmd! * 39 | " autocmd BufWritePost execute 'silent! lmake!' . s:makeOption() . '"%"' 40 | autocmd QuickFixCmdPost call s:quickfixEncode() 41 | augroup END 42 | 43 | " setlocal omnifunc=javacomplete#Complete 44 | 45 | " Search "package", and :lcd. 46 | function s:cd_to_package() 47 | for i in range(1, line('$')) 48 | let line = getline(i) 49 | if line =~# '^\s*\%(import\|public\|class\)' 50 | break 51 | elseif line =~# '\v^\s*package\s+[[:alnum:].]+\s*;\s*$' 52 | let b:lcd = expand('%:p:h') . '/' . 53 | \ repeat('../', strlen(substitute(line, '[^.]', '', 'g')) + 1) 54 | lcd `=b:lcd` 55 | let b:lcd = getcwd() " Normalize 56 | return 57 | endif 58 | endfor 59 | endfunction 60 | if filereadable(bufname('')) " File exists on local? 61 | call s:cd_to_package() 62 | endif 63 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/pack/personal/start/default/after/ftplugin/javaclass.vim: -------------------------------------------------------------------------------- 1 | if executable('jad') 2 | silent %!jad -t -clear -ff -nonlb -8 -p "%" 3 | runtime! syntax/java.vim 4 | setlocal readonly 5 | 6 | SetUndoFtplugin setl ro< 7 | SetUndoFtplugin silent undo 8 | endif 9 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/pack/personal/start/default/after/ftplugin/javascript.vim: -------------------------------------------------------------------------------- 1 | SetUndoFtplugin setlocal et< ts< sw< sts< 2 | 3 | setlocal expandtab tabstop=2 shiftwidth=2 softtabstop=2 4 | 5 | vnoremap go c=PP(eval(@")) 6 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/pack/personal/start/default/after/ftplugin/jproperties.vim: -------------------------------------------------------------------------------- 1 | SetUndoFtplugin setl isk< 2 | 3 | setlocal iskeyword+=. 4 | 5 | if executable("native2ascii") && &modifiable 6 | function s:is_ascii_only() 7 | return !search('[^\x00-\x7F]', 'cnw') 8 | endfunction 9 | 10 | function s:encode() 11 | if s:is_ascii_only() 12 | return 13 | endif 14 | call s:with_cursor('silent %!native2ascii -encoding ' . s:java_encoding()) 15 | endfunction 16 | function s:decode() 17 | if s:is_ascii_only() 18 | return 19 | endif 20 | call s:with_cursor('silent %!native2ascii -reverse -encoding ' . s:java_encoding()) 21 | endfunction 22 | 23 | function s:java_encoding() 24 | let enc = &fileencoding ==# '' ? &encoding : &fileencoding 25 | return get({ 26 | \ 'cp932': 'Shift_JIS', 27 | \ }, enc, enc) 28 | endfunction 29 | 30 | function s:with_cursor(cmd) 31 | let cursor = getpos('.') 32 | execute a:cmd 33 | call setpos('.', cursor) 34 | endfunction 35 | SetUndoFtplugin au! custom-ftplugin-jproperties * 36 | SetUndoFtplugin do BufWritePre 37 | call s:decode() 38 | 39 | augroup custom-ftplugin-jproperties 40 | autocmd! * 41 | autocmd BufWritePre call s:encode() 42 | autocmd BufWritePost call s:decode() 43 | augroup END 44 | endif 45 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/pack/personal/start/default/after/ftplugin/json.vim: -------------------------------------------------------------------------------- 1 | setlocal foldtext=JsonFoldText() 2 | 3 | function JsonFoldText() 4 | return foldtext() 5 | let base = matchstr(foldtext(), '^.\{-}:') 6 | let lines = getline(v:foldstart, v:foldend) 7 | endfunction 8 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/pack/personal/start/default/after/ftplugin/kotlin.vim: -------------------------------------------------------------------------------- 1 | SetUndoFtplugin setl et< ts< sw< 2 | 3 | setlocal expandtab tabstop=4 shiftwidth=4 4 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/pack/personal/start/default/after/ftplugin/ku.vim: -------------------------------------------------------------------------------- 1 | imap (ku-cancel) 2 | imap (ku-cancel) 3 | imap (ku-cancel) 4 | imap (ku-do-the-default-action) 5 | imap (ku-choose-an-action) 6 | imap (ku-choose-source) 7 | 8 | inoremap :KuDoAction below 9 | inoremap :KuDoAction right 10 | inoremap :KuDoAction tab-right 11 | 12 | setlocal nonumber 13 | NeoComplCacheLock 14 | 15 | " It is necessary to avoid the setting of the default key mapping. 16 | let b:did_ftplugin = 1 17 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/pack/personal/start/default/after/ftplugin/lhaskell.vim: -------------------------------------------------------------------------------- 1 | let b:partedit_filetype = 'haskell' 2 | let b:partedit_prefix = '> ' 3 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/pack/personal/start/default/after/ftplugin/lua.vim: -------------------------------------------------------------------------------- 1 | SetUndoFtplugin setl include< includeexpr< suffixesadd< ts< sw< et< 2 | 3 | setlocal include=^\s*require 4 | setlocal includeexpr=substitute(v:fname,'\\.','/','g') 5 | setlocal suffixesadd=.lua 6 | 7 | setlocal tabstop=2 shiftwidth=2 expandtab 8 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/pack/personal/start/default/after/ftplugin/man.vim: -------------------------------------------------------------------------------- 1 | SetUndoFtplugin setl wfw< wrap< 2 | 3 | vertical resize 78 4 | setlocal winfixwidth wrap 5 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/pack/personal/start/default/after/ftplugin/markdown.vim: -------------------------------------------------------------------------------- 1 | SetUndoFtplugin setl et< ts< sw< sts< 2 | 3 | setlocal expandtab tabstop=2 shiftwidth=2 softtabstop=-1 4 | 5 | command! -bar -buffer MarkdownToggleCheck 6 | \ keeppattern substitute/^\s*- \[\zs.\ze\]/\=[' ','x'][submatch(0)==' ']/ 7 | 8 | nnoremap c :MarkdownToggleCheck 9 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/pack/personal/start/default/after/ftplugin/mysql.vim: -------------------------------------------------------------------------------- 1 | function s:define_abbr(list) 2 | for word in a:list 3 | execute printf('inoreabbrev %s %s', word, toupper(word)) 4 | endfor 5 | endfunction 6 | 7 | function s:get_keywords(syn) 8 | return filter(split(matchstr(execute('syntax list ' . a:syn), 9 | \ 'xxx \zs\_.*\ze links to')), 'v:val !~# "\\W"') 10 | endfunction 11 | 12 | if !exists('s:keywords') 13 | let s:keywords = s:get_keywords('mysqlKeyword') 14 | \ + s:get_keywords('mysqlOperator') 15 | \ + s:get_keywords('mysqlSpecial') 16 | endif 17 | 18 | if empty(s:keywords) 19 | let s:sfile = expand('') 20 | augroup custom-ftplugin-mysql 21 | autocmd! 22 | autocmd Syntax mysql source `=s:sfile` 23 | augroup END 24 | else 25 | call s:define_abbr(s:keywords) 26 | endif 27 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/pack/personal/start/default/after/ftplugin/neosnippet.vim: -------------------------------------------------------------------------------- 1 | SetUndoFtplugin setl et< ts< sw< cms< 2 | 3 | setlocal noexpandtab tabstop=4 shiftwidth=4 commentstring=#\ %s 4 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/pack/personal/start/default/after/ftplugin/notebook.vim: -------------------------------------------------------------------------------- 1 | SetUndoFtplugin setl et< 2 | 3 | setlocal expandtab 4 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/pack/personal/start/default/after/ftplugin/perl.vim: -------------------------------------------------------------------------------- 1 | SetUndoFtplugin setl path< 2 | SetUndoFtplugin autocmd! custom-ftplugin-perl * 3 | 4 | let g:perl_compiler_force_warnings = 0 5 | 6 | compiler perl 7 | 8 | if executable('perl') 9 | if !exists('s:path') 10 | let s:path = system('perl -e ' . 11 | \ shellescape('print join(q/,/, map{$_=~s/([, ])/\\$1/g;$_}@INC)')) 12 | endif 13 | let &l:path = s:path 14 | endif 15 | 16 | augroup custom-ftplugin-perl 17 | autocmd! * 18 | autocmd BufWritePost silent! lmake! "%" 19 | augroup END 20 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/pack/personal/start/default/after/ftplugin/php.vim: -------------------------------------------------------------------------------- 1 | SetUndoFtplugin unlet! b:ftdetect 2 | SetUndoFtplugin setl et< sw< sts< path< 3 | SetUndoFtplugin iunmap @ 4 | 5 | setlocal expandtab shiftwidth=4 softtabstop=4 6 | 7 | if executable('php') 8 | if !exists('s:path') 9 | let s:path = substitute(system('php', ''), 10 | \ '[:;]', ',', 'g') 11 | endif 12 | let &l:path = s:path 13 | endif 14 | 15 | function s:at() 16 | return CurrentSyntax() =~# 'String\|Comment\|None' ? '@' : '$this->' 17 | endfunction 18 | inoremap @ at() 19 | 20 | compiler php 21 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/pack/personal/start/default/after/ftplugin/python.vim: -------------------------------------------------------------------------------- 1 | SetUndoFtplugin setl ts< sw< sts< sta< et< ai< path< fdm< 2 | 3 | setlocal tabstop=4 shiftwidth=4 softtabstop=4 smarttab expandtab autoindent 4 | setlocal foldmethod=indent 5 | 6 | if executable('python') 7 | if !exists('s:path') 8 | let s:path = system('python -', 9 | \ 'import sys;sys.stdout.write(",".join(sys.path))') 10 | endif 11 | let &l:path = s:path 12 | endif 13 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/pack/personal/start/default/after/ftplugin/qf.vim: -------------------------------------------------------------------------------- 1 | SetUndoFtplugin mapclear 2 | SetUndoFtplugin setlocal stl& 3 | 4 | noremap 5 | noremap j jk(v:count1) 6 | noremap k jk(-v:count1) 7 | noremap gj gj 8 | noremap gk gk 9 | 10 | noremap p zzp 11 | noremap J jzzp 12 | noremap K kzzp 13 | noremap q c 14 | 15 | nnoremap r :Qfreplace 16 | nnoremap u :Unite qf 17 | 18 | function s:jk(motion) 19 | let max = line('$') 20 | let list = s:getlist() 21 | let cur = line('.') - 1 22 | let pos = vimrc#modulo(cur + a:motion, max) 23 | let m = 0 < a:motion ? 1 : -1 24 | while cur != pos && list[pos].bufnr == 0 25 | let pos = vimrc#modulo(pos + m, max) 26 | endwhile 27 | return (pos + 1) . 'G' 28 | endfunction 29 | 30 | " if exists(':Setlocal') == 2 31 | " Setlocal nosplitbelow 32 | " endif 33 | setlocal statusline+=\ %L 34 | 35 | nnoremap dd :call del_entry() 36 | nnoremap x :call del_entry() 37 | vnoremap d :call del_entry() 38 | vnoremap x :call del_entry() 39 | nnoremap u :call undo_entry() 40 | 41 | command! -nargs=* -bang -buffer QfGrep call s:grep(, 0) 42 | 43 | if exists('*s:undo_entry') 44 | finish 45 | endif 46 | 47 | function s:grep(pat, invert) abort 48 | let pat = a:pat =~# '\S' ? a:pat : @/ 49 | let qf = s:getlist() 50 | call s:add_history(qf) 51 | let op = a:invert ? '!~#' : '=~#' 52 | call filter(qf, 'v:val.text ' . op . ' pat') 53 | call s:setlist(qf) 54 | endfunction 55 | 56 | function s:is_loclistwin() abort 57 | return win_getid() == getloclist(0, {'winid': 1}).winid 58 | endfunction 59 | 60 | function s:getlist() abort 61 | if s:is_loclistwin() 62 | return getloclist(0) 63 | else 64 | return getqflist() 65 | endif 66 | endfunction 67 | 68 | function s:setlist(list) abort 69 | if s:is_loclistwin() 70 | call setloclist(0, a:list, 'r') 71 | else 72 | call setqflist(a:list, 'r') 73 | endif 74 | endfunction 75 | 76 | function s:undo_entry() 77 | let history = get(w:, 'qf_history', []) 78 | if !empty(history) 79 | call s:setlist(remove(history, -1)) 80 | endif 81 | endfunction 82 | 83 | function s:del_entry() range 84 | let qf = s:getlist() 85 | call s:add_history(qf) 86 | unlet! qf[a:firstline - 1 : a:lastline - 1] 87 | call s:setlist(qf) 88 | execute a:firstline 89 | endfunction 90 | 91 | function s:add_history(qf) abort 92 | let history = get(w:, 'qf_history', []) 93 | call add(history, copy(a:qf)) 94 | let w:qf_history = history 95 | endfunction 96 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/pack/personal/start/default/after/ftplugin/ref.vim: -------------------------------------------------------------------------------- 1 | setlocal nolist 2 | 3 | nnoremap q c 4 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/pack/personal/start/default/after/ftplugin/ruby.vim: -------------------------------------------------------------------------------- 1 | SetUndoFtplugin setl ts< sw< sts< sta< et< ai< isk< 2 | 3 | setlocal tabstop=2 shiftwidth=2 softtabstop=2 smarttab expandtab autoindent 4 | setlocal isk+=? isk+=! 5 | 6 | compiler ruby 7 | 8 | if filereadable('.rubocop.yml') 9 | let b:watchdogs_checker_type = 'watchdogs_checker/rubocop' 10 | endif 11 | 12 | if expand('%:p') =~# '_spec\.rb$' 13 | let b:quickrun_config = { 14 | \ 'type': 'ruby/rspec', 15 | \ } 16 | endif 17 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/pack/personal/start/default/after/ftplugin/sablecc.vim: -------------------------------------------------------------------------------- 1 | SetUndoFtplugin setl ts< sw< sts< sta< et< ai< 2 | 3 | setlocal tabstop=2 shiftwidth=2 softtabstop=2 smarttab expandtab autoindent 4 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/pack/personal/start/default/after/ftplugin/scala.vim: -------------------------------------------------------------------------------- 1 | finish 2 | let b:ftdetect = 1 3 | 4 | function s:SID() 5 | return matchstr(expand(''), '\d\+_\zeSID$') 6 | endfunction 7 | 8 | if !exists('s:config') 9 | let s:config = { 10 | \ 'exec': [':echo ' . s:SID() . "execute_scala('%S:p', self)"], 11 | \ 'tempfile': '{' . s:SID() . 'class(self)}.scala', 12 | \ 'delete': 1, 13 | \ } 14 | 15 | function s:config.getfiles(f) 16 | return [a:f] 17 | endfunction 18 | 19 | function s:config.dir() 20 | return tempname() 21 | endfunction 22 | 23 | let s:config.options = ['-unchecked', '-deprecation'] 24 | endif 25 | 26 | if search('^\s*\%(class\|object\)\>', 'wn') 27 | if !exists('b:quickrun_config') 28 | let b:quickrun_config = {} 29 | endif 30 | let b:quickrun_config = extend(copy(s:config), b:quickrun_config) 31 | endif 32 | 33 | let s:rmdir = split(has('win32') || has('win64') ? 'rmdir /S /Q' : 'rmdir -fr') 34 | 35 | function s:class(self) 36 | let src = a:self.config.src 37 | return type(src) == type(0) ? fnamemodify(bufname(src), ':t:r') 38 | \ : matchstr(src, '\(^\|\n\)\s*\\s\+\zs\w\+') 39 | endfunction 40 | 41 | 42 | function s:execute_scala(file, self) 43 | let class = s:class(a:self) 44 | let dir = a:self.config.dir() 45 | if !isdirectory(dir) 46 | call mkdir(dir) 47 | endif 48 | let files = a:self.config.getfiles(a:file) 49 | try 50 | let compile_error = vimproc#system(['fsc', '-d', dir] + a:self.config.options + files) 51 | if compile_error != '' 52 | return compile_error 53 | endif 54 | let res = vimproc#system(['scala', '-classpath', dir, class]) 55 | return iconv(res, &termencoding, &encoding) 56 | finally 57 | if a:self.config.delete 58 | call vimproc#system(s:rmdir + [dir]) 59 | endif 60 | endtry 61 | endfunction 62 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/pack/personal/start/default/after/ftplugin/scheme.vim: -------------------------------------------------------------------------------- 1 | SetUndoFtplugin setl cin< et< cms< 2 | SetUndoFtplugin iunmap ( 3 | SetUndoFtplugin iunmap ) 4 | SetUndoFtplugin iunmap 5 | SetUndoFtplugin iunmap 6 | 7 | setlocal nocindent expandtab commentstring=;\ %s 8 | 9 | " 現在位置の構文グループの名前。リンクは解決済み 10 | function s:get_syntax_name() 11 | let col = col('.') 12 | if col == col('$') 13 | let col -= 1 14 | endif 15 | return synIDattr(synIDtrans(synID(line("."), col, 1)), 'name') 16 | endfunction 17 | 18 | function s:is_disable_pare_assist() 19 | let synname = s:get_syntax_name() 20 | return synname ==? 'Constant' || synname ==? 'Comment' 21 | endfunction 22 | 23 | " 開き括弧の直前で(を押した時、既にある括弧全体を囲む 24 | " そうでなければ()にして間にカーソルを置く 25 | " ただし文字列中やコメント中は何もしない 26 | function s:overwrap_pare() 27 | let ch = getline('.')[col('.') - 1] 28 | if s:is_disable_pare_assist() 29 | return '(' 30 | elseif ch == '(' 31 | return "\%)\h\%(" 32 | elseif ch =~ '\k' 33 | return "\ea)\\b(" 34 | endif 35 | return "()\" 36 | endfunction 37 | 38 | " 次の文字が ')' だった時指定したキーを押す 39 | function s:skip_close_pare(defkey, altkey) 40 | if !s:is_disable_pare_assist() && getline('.')[col('.') - 1] == ')' 41 | return a:altkey 42 | endif 43 | return a:defkey 44 | endfunction 45 | 46 | function s:wrap_tab() 47 | let tab = "\" 48 | if s:is_disable_pare_assist() 49 | return tab 50 | endif 51 | let ch = getline('.')[col('.') - 1] 52 | if ch == '(' 53 | return "\%\" 54 | elseif ch == ')' 55 | return s:skip_close_pare(tab, "\") 56 | endif 57 | return tab 58 | endfunction 59 | 60 | " ()の真ん中で指定キーを押した時)を消す 61 | function s:del_pare(defkey) 62 | if !s:is_disable_pare_assist() && getline('.')[col('.') - 2] == '(' 63 | return a:defkey . s:skip_close_pare('', "\") 64 | endif 65 | return a:defkey 66 | endfunction 67 | 68 | " 閉じ括弧も同時入力 69 | inoremap ( overwrap_pare() 70 | " タブで閉じ括弧をスキップ 71 | inoremap wrap_tab() 72 | " )でも余計にはさまずスキップ(使いづらかったら削除) 73 | inoremap ) skip_close_pare(")", "\") 74 | 75 | " ()の真ん中で(を消した時)も消す 76 | inoremap del_pare("\") 77 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/pack/personal/start/default/after/ftplugin/scss.vim: -------------------------------------------------------------------------------- 1 | SetUndoFtplugin setl iskeyword< 2 | 3 | setlocal iskeyword+=-,$ 4 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/pack/personal/start/default/after/ftplugin/sh.vim: -------------------------------------------------------------------------------- 1 | SetUndoFtplugin setl et< ff< isk< 2 | 3 | if &modifiable 4 | setlocal noexpandtab fileformat=unix 5 | endif 6 | setlocal iskeyword+=- 7 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/pack/personal/start/default/after/ftplugin/showtime.vim: -------------------------------------------------------------------------------- 1 | SetUndoFtplugin unlet! b:cursorline_disable 2 | 3 | let b:cursorline_disable = 1 4 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/pack/personal/start/default/after/ftplugin/svn.vim: -------------------------------------------------------------------------------- 1 | SetUndoFtplugin setl ml< fenc< 2 | 3 | setlocal nomodeline 4 | 5 | if &termencoding != '' 6 | let &l:fileencoding = &termencoding 7 | endif 8 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/pack/personal/start/default/after/ftplugin/text.vim: -------------------------------------------------------------------------------- 1 | let b:ftdetect = 1 2 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/pack/personal/start/default/after/ftplugin/typescript.vim: -------------------------------------------------------------------------------- 1 | SetUndoFtplugin iunmap @ 2 | 3 | function s:at() 4 | if CurrentSyntax() =~# 'String\|Comment\|None' 5 | return '@' 6 | endif 7 | return smartchr#loop('@', 'this.') 8 | endfunction 9 | inoremap @ at() 10 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/pack/personal/start/default/after/ftplugin/unite.vim: -------------------------------------------------------------------------------- 1 | nmap q (unite_all_exit) 2 | imap (unite_all_exit) 3 | 4 | nmap s (unite_toggle_mark_current_candidate) 5 | 6 | imap (unite_delete_backward_path) 7 | 8 | nnoremap unite#do_action('below') 9 | nnoremap unite#do_action('right') 10 | nnoremap unite#do_action('tabopen') 11 | nnoremap T unite#do_action('tabvsplit') 12 | 13 | inoremap unite#do_action('below') 14 | inoremap unite#do_action('right') 15 | inoremap unite#do_action('tabopen') 16 | 17 | nmap (unite_redraw) 18 | inoremap (C-o) 19 | imap (C-o) 20 | 21 | let s:context = unite#get_context() 22 | 23 | if s:context.buffer_name =~# '^file' 24 | if executable('ag') 25 | inoremap unite#do_action('rec/async') 26 | else 27 | inoremap unite#do_action('rec') 28 | endif 29 | inoremap unite#do_action('narrow') 30 | inoremap unite#do_action('grep_directory') 31 | endif 32 | 33 | if s:context.buffer_name ==# 'completion' 34 | inoremap unite#do_action('insert') 35 | endif 36 | 37 | if s:context.buffer_name ==# 'outline' 38 | nnoremap p unite#do_action('persist_open') 39 | endif 40 | 41 | let b:cursorline_disable = 1 42 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/pack/personal/start/default/after/ftplugin/vim.vim: -------------------------------------------------------------------------------- 1 | SetUndoFtplugin setl ts< sw< sts< sta< et< ai< kp< tw< fo< ml< cc< 2 | 3 | setlocal tabstop=2 shiftwidth=2 softtabstop=2 smarttab expandtab 4 | setlocal autoindent keywordprg=:help 5 | setlocal textwidth=78 formatoptions-=r formatoptions-=o 6 | setlocal colorcolumn=+1 7 | if &modifiable 8 | setlocal fileformat=unix 9 | endif 10 | if expand('%:e') ==? 'vim' 11 | setlocal nomodeline 12 | SetUndoFtplugin setl ml< 13 | endif 14 | " setlocal foldmethod< 15 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/pack/personal/start/default/after/ftplugin/vimfiler.vim: -------------------------------------------------------------------------------- 1 | nunmap 2 | vunmap 3 | nmap s (vimfiler_toggle_mark_current_line) 4 | vmap s (vimfiler_toggle_mark_selected_lines) 5 | unmap d 6 | map dd (vimfiler_mark_current_line)(vimfiler_delete_file) 7 | map mm (vimfiler_mark_current_line)(vimfiler_move_file) 8 | map yy (vimfiler_mark_current_line)(vimfiler_clipboard_copy_file) 9 | map x (vimfiler_mark_current_line)(vimfiler_clipboard_move_file) 10 | map p (vimfiler_clipboard_paste) 11 | 12 | nmap sh (vimfiler_popup_shell) 13 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/pack/personal/start/default/after/ftplugin/vimgolf.vim: -------------------------------------------------------------------------------- 1 | SetUndoFtplugin setl eol< fixeol< 2 | 3 | setlocal noendofline nofixendofline 4 | 5 | let b:statusline_filesize = 1 6 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/pack/personal/start/default/after/ftplugin/vimshell.vim: -------------------------------------------------------------------------------- 1 | SetUndoFtplugin setl ml< 2 | 3 | setlocal nomodeline 4 | 5 | silent! unmap 6 | silent! unmap 7 | silent! nunmap 8 | 9 | inoremap (vimshell_hide) :hide 10 | inoremap (vimshell_complete_history) 11 | \ =complete_history() 12 | " or exit? 13 | imap 14 | \ getline('.') =~# '^\V' . g:vimshell_prompt . '\m\s*$' ? 15 | \ "\(vimshell_hide)" : "\(vimshell_complete_history)" 16 | 17 | " imap (vimshell_history_complete_whole) 18 | imap (vimshell_complete_history) 19 | inoremap 20 | \ unite#sources#vimshell_history#start_complete(1) 21 | nnoremap 22 | \ unite#sources#vimshell_history#start_complete(0) 23 | " imap (vimshell_complete_history) 24 | " inoremap 25 | " \ unite#sources#vimshell_history#start_complete() 26 | imap (vimshell_clear) 27 | 28 | function s:complete_history() 29 | call complete(len(vimshell#get_prompt()) + 1, g:vimshell#hist_buffer) 30 | return '' 31 | endfunction 32 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/pack/personal/start/default/after/ftplugin/xml.vim: -------------------------------------------------------------------------------- 1 | SetUndoFtplugin setl sw< 2 | 3 | setlocal shiftwidth=2 4 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/pack/personal/start/default/after/ftplugin/xxd.vim: -------------------------------------------------------------------------------- 1 | if !executable('xxd') 2 | finish 3 | endif 4 | SetUndoFtplugin setl bin< eol< 5 | SetUndoFtplugin au! custom-ftplugin-xxd * 6 | SetUndoFtplugin call XxdRestore() 7 | 8 | function s:to_xxd() 9 | silent %!xxd -g 1 10 | silent! %substitute/\r$//e 11 | let b:xxd = 1 12 | endfunction 13 | 14 | " FIXME 15 | function XxdRestore() 16 | call s:restore() 17 | endfunction 18 | function s:restore() 19 | if exists('b:xxd') 20 | silent %!xxd -r 21 | unlet! b:xxd 22 | endif 23 | endfunction 24 | 25 | function s:write_pre() 26 | let b:xxd_cursor = getpos('.') 27 | call s:restore() 28 | endfunction 29 | 30 | function s:write_post() 31 | call s:to_xxd() 32 | setlocal nomodified 33 | if exists('b:xxd_cursor') 34 | call setpos('.', b:xxd_cursor) 35 | unlet b:xxd_cursor 36 | endif 37 | endfunction 38 | 39 | 40 | let s:bin = &l:binary 41 | setlocal binary noendofline 42 | if !s:bin && !&l:modified 43 | noautocmd edit " reload with binary mode. 44 | endif 45 | unlet s:bin 46 | 47 | call s:to_xxd() 48 | augroup custom-ftplugin-xxd 49 | autocmd! * 50 | autocmd BufReadPre unlet! b:xxd 51 | autocmd BufReadPost call s:to_xxd() 52 | autocmd BufWritePre call s:write_pre() 53 | autocmd BufWritePost call s:write_post() 54 | 55 | autocmd CursorMovedI call s:complete() 56 | augroup END 57 | 58 | 59 | function s:complete() 60 | if getline('.') != '' 61 | return 62 | endif 63 | let addr = line('.') == 1 64 | \ ? 0 : str2nr(matchstr(getline(line('.') - 1), '^\x*'), 16) + 16 65 | 66 | call setline('.', printf('%07x: ', addr)) 67 | startinsert! 68 | endfunction 69 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/pack/personal/start/default/after/ftplugin/yaml.vim: -------------------------------------------------------------------------------- 1 | SetUndoFtplugin setl sw< ts< 2 | 3 | setlocal shiftwidth=2 tabstop=2 4 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/pack/personal/start/default/after/ftplugin/zsh.vim: -------------------------------------------------------------------------------- 1 | SetUndoFtplugin setl et< 2 | 3 | setlocal noexpandtab 4 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/pack/personal/start/default/after/plugin/unmap.vim: -------------------------------------------------------------------------------- 1 | " Removed unuseful mappings. 2 | 3 | " plugin/migemo.vim 4 | silent! unmap mi 5 | " plugin/bugsummary.vim (in Gentoo) 6 | silent! unmap bug 7 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/pack/personal/start/default/after/syntax/ant.vim: -------------------------------------------------------------------------------- 1 | syntax match antProperty "\${.\{-}}" containedin=xmlString 2 | 3 | highlight default link antProperty Special 4 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/pack/personal/start/default/after/syntax/cs.vim: -------------------------------------------------------------------------------- 1 | syntax keyword csType var in 2 | 3 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/pack/personal/start/default/after/syntax/help.vim: -------------------------------------------------------------------------------- 1 | highlight link helpURL Underlined 2 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/pack/personal/start/default/after/syntax/json.vim: -------------------------------------------------------------------------------- 1 | 2 | syntax sync fromstart 3 | 4 | syn match jsonString /"\%(true\|false\|null\)\?"/ contains=jsonQuote 5 | syn match jsonNumber /"-\=\<\%(0\|[1-9]\d*\)\%(\.\d\+\)\=\%([eE][-+]\=\d\+\)\=\>"/ contains=jsonQuote 6 | syn match jsonQuote /"/ contained 7 | 8 | highlight link jsonBraceNotClosedError Error 9 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/pack/personal/start/default/after/syntax/markdown.vim: -------------------------------------------------------------------------------- 1 | let s:current_syntax = get(b:, 'current_syntax', '') 2 | unlet! b:current_syntax 3 | syntax include @markdownYAML syntax/yaml.vim 4 | syntax region markdownYAMLHeader matchgroup=PreProc start='\%1l\%1c---\n' end='\n---$' contains=@markdownYAML 5 | 6 | syn region markdownCode matchgroup=markdownBlockDelimiter start=+^```$+ end=+^```$+ 7 | 8 | let b:markdown_syntax_code_loaded = {} " Reset when load. 9 | function s:update_code() 10 | let mx = '^```\zs.\+$' 11 | for curline in getline(1, '$') 12 | let ft = matchstr(curline, mx) 13 | if ft !=# '' && !has_key(b:markdown_syntax_code_loaded, ft) 14 | \ && globpath(&runtimepath, 'syntax/' . ft . '.vim') !=# '' 15 | unlet! b:current_syntax 16 | let save_isk = &l:iskeyword " For scheme. 17 | execute printf('syntax include @markdownCode_%s syntax/%s.vim', 18 | \ ft, ft) 19 | let &l:iskeyword = save_isk 20 | 21 | execute printf('syntax region markdownCodePre ' 22 | \ . 'matchgroup=markdownBlockDelimiter start="^```%s$" end="^```$" ' 23 | \ . 'contains=@markdownCode_%s', ft, ft) 24 | 25 | let b:markdown_syntax_code_loaded[ft] = 1 26 | end 27 | endfor 28 | " workaround for perl 29 | syntax cluster MarkdownCode_perl remove=perlFunctionName 30 | syntax sync fromstart 31 | endfunction 32 | 33 | command! -buffer -bar MarkdownCodeUpdate call s:update_code() 34 | " MarkdownCodeUpdate 35 | 36 | highlight link markdownBlockDelimiter Delimiter 37 | 38 | syntax sync fromstart 39 | 40 | if s:current_syntax !=# '' 41 | let b:current_syntax = s:current_syntax 42 | endif 43 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/pack/personal/start/default/after/syntax/rst.vim: -------------------------------------------------------------------------------- 1 | syntax match rstNumberedList /^\s*\zs\%(\a\+\.\|\d\+\.\|(\?\d\+)\) / 2 | syntax match rstUnnumberedList /^\s*[-+*] / 3 | 4 | highlight default link rstNumberedList Identifier 5 | highlight default link rstUnnumberedList Identifier 6 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/pack/personal/start/default/after/syntax/vim.vim: -------------------------------------------------------------------------------- 1 | syntax region vimSet matchgroup=vimCommand start="\" skip="\%(\\\\\)*\\." end="$" end="|" matchgroup=vimNotation end="<[cC][rR]>" keepend oneline contains=vimSetEqual,vimOption,vimErrSetting,vimComment,vim9Comment,vimSetString,vimSetMod 2 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/pack/personal/start/default/ftdetect/filetype.vim: -------------------------------------------------------------------------------- 1 | autocmd BufReadPost,BufNewFile /etc/httpd/conf.d/*.conf setfiletype apache 2 | autocmd BufReadPost,BufNewFile /etc/apache{2,}/*.d/*.conf setfiletype apache 3 | autocmd BufReadPost,BufNewFile */dot.zsh/* setfiletype zsh 4 | 5 | autocmd BufReadPost,BufNewFile Guardfile,*.god,*.rbi setlocal filetype=ruby 6 | autocmd BufReadPost,BufNewFile *.jam,Jamroot,Jamfile setlocal filetype=jam 7 | autocmd BufReadPost,BufNewFile *.scala setlocal filetype=scala 8 | autocmd BufReadPost,BufNewFile *.noop setlocal filetype=noop 9 | autocmd BufReadPost,BufNewFile *.r setlocal filetype=r 10 | autocmd BufReadPost,BufNewFile *.wsgi setlocal filetype=python 11 | autocmd BufReadPost,BufNewFile *.ng setlocal filetype=javascript 12 | autocmd BufReadPost,BufNewFile *.hx setlocal filetype=haxe 13 | autocmd BufReadPost,BufNewFile *.grass setlocal filetype=grass 14 | autocmd BufReadPost,BufNewFile *.kt setlocal filetype=kotlin 15 | autocmd BufReadPost,BufNewFile Dockerfile.* setlocal filetype=dockerfile 16 | 17 | autocmd BufReadPost,BufNewFile *.json.jb{,uilder} setlocal filetype=ruby 18 | autocmd BufReadPost,BufNewFile .pryrc setlocal filetype=ruby 19 | autocmd BufReadPost,BufNewFile {database,secrets}.yml setlocal filetype=eruby.yaml 20 | autocmd BufReadPost,BufNewFile */config/*.yml setlocal filetype=eruby.yaml 21 | autocmd BufReadPost,BufNewFile .babelrc setlocal filetype=json 22 | autocmd BufReadPost,BufNewFile .flowconfig setlocal filetype=dosini 23 | autocmd BufReadPost,BufNewFile .envrc setlocal filetype=sh 24 | 25 | autocmd BufReadPost,BufNewFile *.csv setfiletype csv 26 | autocmd BufReadPost,BufNewFile *.nut setfiletype squirrel 27 | autocmd BufReadPost,BufNewFile *.bin,*.exe,*.dll setfiletype xxd 28 | autocmd BufReadPost,BufNewFile *.vi,*.vimgolf setfiletype vimgolf 29 | 30 | autocmd BufReadPost,BufNewFile *.txt,README call s:structured_text() 31 | autocmd BufReadPost,BufNewFile *.class call s:detect_javaclass() 32 | 33 | function s:detect_javaclass() 34 | let file = expand('') 35 | if !filereadable(file) 36 | return 37 | endif 38 | let line = readfile(file, 'b', 1)[0] 39 | if 4 <= strlen(line) && line[:3] == "\xCA\xFE\xBA\xBE" 40 | setlocal filetype=javaclass 41 | endif 42 | endfunction 43 | 44 | function s:structured_text() 45 | if &l:filetype !=# '' && &l:filetype !=# 'text' 46 | return 47 | endif 48 | let line1 = getline(1) 49 | let line2 = getline(2) 50 | let &l:filetype = 51 | \ line1 =~# '^\([=-`:''"~^_*+#<>]\)\1*$' ? 'rst' : 52 | \ line1 =~# '^=' ? 'notebook' : 53 | \ line1 =~# '^h\d\. ' ? 'textile' : 54 | \ line1 =~# '^#' || 55 | \ line2 =~# '^=\+$' ? 'markdown' : 56 | \ 'text' 57 | endfunction 58 | 59 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/snippets/_.snip: -------------------------------------------------------------------------------- 1 | snippet date 2 | alias today 3 | `strftime("%Y-%m-%d")` 4 | 5 | snippet mail 6 | thinca@gmail.com 7 | 8 | delete register+ 9 | delete register* 10 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/snippets/ant.snip: -------------------------------------------------------------------------------- 1 | snippet target 2 | abbr target 3 | options head 4 | 5 | ${2} 6 | 7 | 8 | snippet targetd 9 | abbr target depends="..." 10 | options head 11 | 12 | ${3} 13 | 14 | 15 | snippet targeti 16 | abbr target if="..." 17 | options head 18 | 19 | ${3} 20 | 21 | 22 | snippet targetu 23 | abbr target unless="..." 24 | options head 25 | 26 | ${3} 27 | 28 | 29 | snippet targetdi 30 | abbr target idepends="..." f="..." 31 | options head 32 | 33 | ${4} 34 | 35 | 36 | snippet targetdu 37 | abbr target depends="..." unless="..." 38 | options head 39 | 40 | ${4} 41 | 42 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/snippets/c.snip: -------------------------------------------------------------------------------- 1 | # main() 2 | snippet main 3 | int main(int argc, const char *argv[]) { 4 | ${1} 5 | return 0; 6 | } 7 | 8 | # #include <...> 9 | snippet inc 10 | #include <${1:stdio}.h>${0} 11 | 12 | # #include "..." 13 | snippet Inc 14 | #include "${1:`expand('%:r').'.h'`}"${0} 15 | 16 | # #ifndef ... #define ... #endif 17 | snippet Def 18 | #ifndef $1 19 | #define ${1:SYMBOL} ${2:value} 20 | #endif${3} 21 | 22 | snippet def 23 | #define 24 | 25 | snippet ifdef 26 | #ifdef ${1:MACRO} 27 | ${2:#define } 28 | #endif 29 | 30 | snippet #if 31 | #if ${1:MACRO} 32 | ${2} 33 | #endif 34 | 35 | snippet once 36 | #ifndef ${1:`toupper(expand('%:gs@\W@_@').'__')`} 37 | #define $1 38 | 39 | ${0} 40 | 41 | #endif /* #ifndef $1 */ 42 | 43 | # If Condition 44 | snippet if 45 | if(${1:/* condition */}) { 46 | ${2:/* code */} 47 | } 48 | 49 | snippet el 50 | else { 51 | ${1} 52 | } 53 | 54 | # Ternary conditional 55 | #snippet t 56 | # ${1:/* condition */} ? ${2:a} : ${3:b} 57 | 58 | # Do While Loop 59 | snippet do 60 | do { 61 | ${2:/* code */} 62 | } while (${1:/* condition */}); 63 | 64 | # While Loop 65 | snippet wh 66 | while (${1:/* condition */}) { 67 | ${2:/* code */} 68 | } 69 | 70 | # For Loop 71 | snippet for 72 | for (${2:i} = 0; $2 < ${1:count}; $2${3:++}) { 73 | ${4:/* code */} 74 | } 75 | 76 | # Custom For Loop 77 | snippet forr 78 | for (${1:i} = ${2:0}; ${3:$1 < 10}; $1${4:++}) { 79 | ${5:/* code */} 80 | } 81 | 82 | # Function 83 | snippet fun 84 | ${1:void} ${2:function_name}(${3}) { 85 | ${4:/* code */} 86 | } 87 | 88 | # Function Declaration 89 | snippet fund 90 | ${1:void} ${2:function_name}(${3});${0} 91 | 92 | # Typedef 93 | snippet td 94 | typedef ${1:int} ${2:MyCustomType};${0} 95 | 96 | # Struct 97 | snippet st 98 | struct ${1:name} { 99 | ${2:/* data */} 100 | }${3: /* optional variable list */};${4} 101 | 102 | # Typedef struct 103 | snippet tds 104 | typedef struct ${2:_$1 } { 105 | ${3:/* data */} 106 | } ${1:name}; 107 | 108 | # Typdef enum 109 | snippet tde 110 | typedef enum { 111 | ${1:/* data */} 112 | } ${2}; 113 | 114 | snippet . 115 | [${1}]${2} 116 | 117 | snippet un 118 | unsigned 119 | 120 | snippet hello 121 | options head 122 | #include 123 | 124 | int main(int argc, char const* argv[]) { 125 | puts("Hello, world!"); 126 | return 0; 127 | } 128 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/snippets/clojure.snip: -------------------------------------------------------------------------------- 1 | snippet (defn 2 | abbr (defn function [...] ... 3 | options head 4 | defn ${1:name} [${2}] 5 | ${3} 6 | 7 | snippet defn 8 | abbr (defn function [...] ... 9 | options head 10 | (defn ${1:name} [${2}] 11 | ${3}) 12 | 13 | snippet try 14 | abbr (try ... (catch ... 15 | options head 16 | (try 17 | ${1} 18 | (catch ${2:java.lang.Exception} e ${3:nil})) 19 | 20 | snippet ref-set 21 | abbr (dosync (ref-set ... 22 | options head 23 | (dosync 24 | (ref-set ${1:ref} ${2:value})) 25 | 26 | snippet hello 27 | options head 28 | (println "Hello, world!") 29 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/snippets/cpp.snip: -------------------------------------------------------------------------------- 1 | # #include <...> 2 | snippet inc 3 | #include <${1:iostream}>${0} 4 | 5 | # #include "..." 6 | snippet Inc 7 | #include "${1:`expand('%:r').'.hpp'`}"${0} 8 | 9 | # printf 10 | snippet pr 11 | std::cout << ${1} << std::endl;${0} 12 | 13 | snippet fpr 14 | std::cerr << ${1} << std::endl;${0} 15 | 16 | # class 17 | snippet cl 18 | options head 19 | class ${1:ClassName} { 20 | ${0} 21 | }; 22 | 23 | snippet cle 24 | options head 25 | class ${1:ClassName} : public ${2:SuperClass} { 26 | ${0} 27 | }; 28 | 29 | snippet ns 30 | options head 31 | namespace ${1:namespace} { 32 | ${0} 33 | } // namespace $1 34 | 35 | snippet nns 36 | options head 37 | namespace { 38 | ${0} 39 | } // namespace 40 | 41 | 42 | # boost 43 | snippet bfor 44 | BOOST_FOREACH(${1:type} ${2:t}, ${3:it}) { 45 | ${0} 46 | } 47 | 48 | snippet hello 49 | options head 50 | #include 51 | 52 | int main(int argc, char** argv) { 53 | std::cout << "Hello, world!" << std::endl; 54 | } 55 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/snippets/haskell.snip: -------------------------------------------------------------------------------- 1 | snippet main 2 | main :: IO () 3 | main = ${1} 4 | 5 | snippet hello 6 | options head 7 | main :: IO () 8 | main = putStrLn "Hello, world!" 9 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/snippets/help.snip: -------------------------------------------------------------------------------- 1 | snippet xx 2 | abbr xxxx-xx-xx 3 | options head 4 | x.x xxxx-xx-xx 5 | 6 | snippet mailv 7 | thinca+vim@gmail.com 8 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/snippets/java.snip: -------------------------------------------------------------------------------- 1 | snippet class 2 | public class ${1:`expand('%:r:t')`} { 3 | ${2} 4 | } 5 | ${3} 6 | 7 | snippet for 8 | for(int ${1:i} = 0; $1 < ${2:len}; $1${3:++}) { 9 | ${4:/* code */} 10 | } 11 | ${5} 12 | 13 | snippet forr 14 | for(int ${1:i} = ${2:len}; 0 <= --$1;) { 15 | ${3:/* code */} 16 | } 17 | ${4} 18 | 19 | snippet fore 20 | for(${1:type} ${2:val} : ${3:list}) { 21 | ${4:/* code */} 22 | } 23 | 24 | snippet main 25 | public static void main(String[] args) { 26 | ${1} 27 | } 28 | 29 | snippet sysout 30 | System.out.println(${1}); 31 | 32 | snippet syserr 33 | System.err.println(${1}); 34 | 35 | snippet sysoutn 36 | System.out.print(${1}); 37 | 38 | snippet systime 39 | System.currentTimeMillis()${1} 40 | 41 | snippet hello 42 | options head 43 | public class Hello { 44 | public static void main(String[] args) { 45 | System.out.println("Hello, world!"); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/snippets/javascript.snip: -------------------------------------------------------------------------------- 1 | snippet xpath 2 | document.evaluate('${1:xpath}', ${2:document}, 3 | null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null) 4 | ${3} 5 | 6 | snippet func 7 | function ${1:function_name}(${2:argument}) { 8 | ${0:// body...} 9 | } 10 | 11 | snippet for 12 | for (var ${2:i} = 0; $2 < ${1:Things}.length; $2++) { 13 | ${0} 14 | } 15 | 16 | snippet fn 17 | () => { 18 | 19 | snippet afn 20 | async () => { 21 | 22 | snippet hello 23 | options head 24 | console.log("Hello, world!"); 25 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/snippets/kotlin.snip: -------------------------------------------------------------------------------- 1 | snippet for 2 | abbr for ( in ) 3 | for (${1:element} in ${2:elements}) { 4 | ${0:TARGET} 5 | } 6 | 7 | snippet fun 8 | abbr fun name() {} 9 | fun ${1:name}(${2:args}): ${3:ret} { 10 | ${0:TARGET} 11 | } 12 | 13 | snippet funu 14 | abbr fun name(): Unit {} 15 | fun ${1:name}(${2:args}) { 16 | ${0:TARGET} 17 | } 18 | 19 | snippet fune 20 | abbr fun name() = 21 | fun ${1:name}(${2:args}) = ${0:TARGET} 22 | 23 | snippet main 24 | options head 25 | fun main(args: Array) { 26 | ${0:println("Hello, world!")} 27 | } 28 | 29 | snippet hello 30 | options head 31 | fun main(args: Array) { 32 | println("Hello, world!") 33 | } 34 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/snippets/lua.snip: -------------------------------------------------------------------------------- 1 | snippet funca 2 | abbr function (args) end 3 | options head 4 | function(${1}) 5 | ${0} 6 | end 7 | 8 | snippet func 9 | abbr function name (args) end 10 | options head 11 | function ${1:name}(${2}) 12 | ${0} 13 | end 14 | 15 | snippet hello 16 | print("Hello, world!\n") 17 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/snippets/mysql.snip: -------------------------------------------------------------------------------- 1 | snippet table 2 | options head 3 | DROP TABLE IF EXISTS $1; 4 | CREATE TABLE ${1:table} ( 5 | ${0} 6 | ) ENGINE=InnoDB, DEFAULT CHARACTER SET utf8; 7 | 8 | snippet key 9 | options head 10 | ${1:id} int PRIMARY KEY AUTO_INCREMENT,${0} 11 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/snippets/ruby.snip: -------------------------------------------------------------------------------- 1 | snippet exc 2 | class ${1}Exception < ${2:Exception}; end 3 | ${2} 4 | 5 | snippet req 6 | require '${1}' 7 | ${2} 8 | 9 | snippet hello 10 | puts 'Hello, world!' 11 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/snippets/rust.snip: -------------------------------------------------------------------------------- 1 | snippet main 2 | fn main() { 3 | ${0} 4 | } 5 | 6 | snippet fn 7 | fn ${1:name}(${2}) { 8 | ${0} 9 | } 10 | 11 | snippet for 12 | for ${2:e} in ${1:iter} { 13 | ${0} 14 | } 15 | 16 | snippet pr 17 | print!(${1}); 18 | 19 | snippet prn 20 | println!(${1}); 21 | 22 | snippet prv 23 | println!("{}", ${1:v}); 24 | 25 | snippet hello 26 | fn main() { 27 | println!("Hello, world!"); 28 | } 29 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/snippets/scala.snip: -------------------------------------------------------------------------------- 1 | snippet obj 2 | abbr object ... { 3 | options head 4 | object ${1:`expand('%:t:r')`} { 5 | ${2} 6 | } 7 | 8 | snippet obje 9 | abbr object ... extends { 10 | options head 11 | object ${1:`expand('%:t:r')`} extends ${2} { 12 | ${3} 13 | } 14 | 15 | snippet objew 16 | abbr object ... extends ... with ... { 17 | options head 18 | object ${1:`expand('%:t:r')`} extends ${2} with ${3}{ 19 | ${4} 20 | } 21 | 22 | snippet class 23 | abbr class 24 | options head 25 | class ${1:`expand('%:t:r')`} { 26 | ${2} 27 | } 28 | 29 | snippet main 30 | options head 31 | def main(args: Array[String]) { 32 | ${1} 33 | } 34 | 35 | snippet fory 36 | abbr for yield 37 | options head 38 | for(${1}) yield ${2} 39 | 40 | 41 | snippet match 42 | abbr match 43 | options head 44 | match { 45 | case ${1} => ${2} 46 | } 47 | 48 | snippet hello 49 | options head 50 | object HelloWorld { 51 | def main(args: Array[String]) { 52 | println("Hello, world!") 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/snippets/vim.snip: -------------------------------------------------------------------------------- 1 | snippet func 2 | function ${1:function_name}(${2}) abort 3 | ${3:" code} 4 | endfunction 5 | 6 | snippet for 7 | for ${1:needle} in ${2:haystack} 8 | ${3:" code} 9 | endfor 10 | 11 | snippet while 12 | while ${1:condition} 13 | ${2:" code} 14 | endwhile 15 | 16 | snippet autoload 17 | abbr autoload func endfunc 18 | alias afunction afunc 19 | options head 20 | function `substitute(matchstr(neosnippet#util#expand('%:p:r'), '/autoload/\zs.*$'), '/', '#', 'g')`#${1:#:func_name}(${2:#:args}) abort 21 | ${0} 22 | endfunction 23 | 24 | snippet main 25 | function s:main() abort 26 | ${0:TARGET} 27 | endfunction 28 | 29 | call s:main() 30 | 31 | snippet mailv 32 | thinca+vim@gmail.com 33 | 34 | snippet hello 35 | options head 36 | echon "Hello, world!\n" 37 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/snippets/zsh.snip: -------------------------------------------------------------------------------- 1 | snippet if 2 | if [[ ${1:condition} ]]; then 3 | ${2:#statements} 4 | fi 5 | ${3} 6 | 7 | snippet elif 8 | elif [[ ${1:condition} ]]; then 9 | ${2:#statements} 10 | 11 | snippet for 12 | for (( ${2:i} = 0; $2 < ${1:count}; $2++ )); do 13 | ${3:#statements} 14 | done 15 | ${4} 16 | 17 | snippet wh 18 | while [[ ${1:condition} ]]; do 19 | ${2:#statements} 20 | done 21 | ${3} 22 | 23 | snippet until 24 | [[ ${1:condition} ]]; do 25 | ${2:#statements} 26 | done 27 | ${3} 28 | 29 | snippet case 30 | case ${1:word} in 31 | ${2:pattern}) 32 | ${3};; 33 | esac 34 | ${4} 35 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/template/Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | 4 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/template/Gemfile.local: -------------------------------------------------------------------------------- 1 | eval_gemfile 'Gemfile' 2 | 3 | 4 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/template/LICENSE.txt: -------------------------------------------------------------------------------- 1 | zlib License 2 | 3 | (C) <%= strftime('%Y') %> thinca 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/template/compiler/template.vim: -------------------------------------------------------------------------------- 1 | :keeppatterns % s/COMPILER_NAME/\=expand('%:t:r')/ge 2 | if exists('g:current_compiler') 3 | finish 4 | endif 5 | let g:current_compiler = 'COMPILER_NAME' 6 | 7 | if exists(':CompilerSet') != 2 " older Vim always used :setlocal 8 | command -nargs=* CompilerSet setlocal 9 | endif 10 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/template/custom/after/ftplugin/template.vim: -------------------------------------------------------------------------------- 1 | SetUndoFtplugin setl 2 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/template/doc/template.jax: -------------------------------------------------------------------------------- 1 | :let s:fname = matchstr(expand('%:p:r:gs?\\?/?'), '.*/doc/\zs.*') 2 | :let s:plugin = substitute(s:fname, '/', '-', 'g') 3 | :silent keeppatterns %s/\CFILENAME/\=s:fname/ge 4 | :silent keeppatterns %s/\CPLUGIN/\=s:plugin/ge 5 | :setlocal filetype=help 6 | :GenerateContents 7 | *FILENAME.txt* **要約** 8 | 9 | Version: 1.0.0 10 | Author : thinca 11 | License: zlib License 12 | 13 | ============================================================================== 14 | 概要 *PLUGIN-introduction* 15 | 16 | *PLUGIN.vim* は ... 17 | 18 | 要件: 19 | - Vim 8.1 以降 20 | 21 | 最新版: 22 | https://github.com/thinca/vim-PLUGIN 23 | 24 | 25 | 26 | ============================================================================== 27 | 使い方 *PLUGIN-usage* 28 | 29 | 30 | 31 | 32 | 33 | ============================================================================== 34 | インターフェース *PLUGIN-interface* 35 | 36 | ------------------------------------------------------------------------------ 37 | コマンド *PLUGIN-commands* 38 | 39 | 40 | ------------------------------------------------------------------------------ 41 | 関数 *PLUGIN-functions* 42 | 43 | 44 | ------------------------------------------------------------------------------ 45 | キーマッピング *PLUGIN-key-mappings* 46 | 47 | 48 | 49 | ============================================================================== 50 | カスタマイズ *PLUGIN-customizing* 51 | 52 | 53 | 54 | ============================================================================== 55 | 更新履歴 *PLUGIN-changelog* 56 | 57 | 1.0.0 xxxx-xx-xx 58 | - 初版。 59 | 60 | 61 | ============================================================================== 62 | vim:tw=78:ts=8:ft=help:norl 63 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/template/doc/template.txt: -------------------------------------------------------------------------------- 1 | :let s:fname = matchstr(expand('%:p:r:gs?\\?/?'), '.*/doc/\zs.*') 2 | :let s:plugin = substitute(s:fname, '/', '-', 'g') 3 | :silent keeppatterns %s/\CFILENAME/\=s:fname/ge 4 | :silent keeppatterns %s/\CPLUGIN/\=s:plugin/ge 5 | :setlocal filetype=help 6 | :GenerateContents 7 | *FILENAME.txt* **Summary** 8 | 9 | Version: 1.0.0 10 | Author : thinca 11 | License: zlib License 12 | 13 | ============================================================================== 14 | INTRODUCTION *PLUGIN-introduction* 15 | 16 | *PLUGIN.vim* is a Vim plugin ... 17 | 18 | Requirements: 19 | - Vim 8.1 or later 20 | 21 | Latest version: 22 | https://github.com/thinca/vim-PLUGIN 23 | 24 | 25 | 26 | ============================================================================== 27 | USAGE *PLUGIN-usage* 28 | 29 | 30 | 31 | 32 | 33 | ============================================================================== 34 | INTERFACE *PLUGIN-interface* 35 | 36 | ------------------------------------------------------------------------------ 37 | COMMANDS *PLUGIN-commands* 38 | 39 | 40 | ------------------------------------------------------------------------------ 41 | FUNCTIONS *PLUGIN-functions* 42 | 43 | 44 | ------------------------------------------------------------------------------ 45 | KEY MAPPINGS *PLUGIN-key-mappings* 46 | 47 | 48 | 49 | ============================================================================== 50 | CUSTOMIZING *PLUGIN-customizing* 51 | 52 | 53 | 54 | ============================================================================== 55 | CHANGELOG *PLUGIN-changelog* 56 | 57 | 1.0.0 xxxx-xx-xx 58 | - Initial version. 59 | 60 | 61 | ============================================================================== 62 | vim:tw=78:ts=8:ft=help:norl 63 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/template/doc/vital/template.txt: -------------------------------------------------------------------------------- 1 | :let s:fname = matchstr(expand('%:p:r:gs?\\?/?'), '.*/\zsvital/.*') 2 | :let s:module = join(map(split(s:fname, '/'), 'substitute(v:val, ''\%(^\|_\)\(\l\)'', ''\U\1'', "g")'), '.') 3 | :silent keeppatterns %s/\CPLUGIN/\=s:fname/ge 4 | :silent keeppatterns %s/\CMODULE/\=s:module/ge 5 | :setlocal filetype=help 6 | :GenerateContents 7 | *PLUGIN.txt* **Summary** 8 | 9 | Maintainer: thinca 10 | 11 | ============================================================================== 12 | CONTENTS *MODULE-contents* 13 | 14 | INTRODUCTION |MODULE-introduction| 15 | INTERFACE |MODULE-interface| 16 | FUNCTIONS |MODULE-functions| 17 | 18 | 19 | 20 | ============================================================================== 21 | INTRODUCTION *MODULE-introduction* 22 | 23 | *MODULE* is a ... library. 24 | 25 | 26 | 27 | ============================================================================== 28 | INTERFACE *MODULE-interface* 29 | 30 | ------------------------------------------------------------------------------ 31 | FUNCTIONS *MODULE-functions* 32 | 33 | 34 | 35 | 36 | ============================================================================== 37 | vim:tw=78:ts=8:ft=help:norl 38 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/template/filetype/perl: -------------------------------------------------------------------------------- 1 | use strict; 2 | use warnings; 3 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/template/filetype/sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -eu 4 | 5 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/template/ftplugin/template.vim: -------------------------------------------------------------------------------- 1 | " <%= expand('%:t:r') %> filetype plugin 2 | if exists('b:did_ftplugin') 3 | finish 4 | endif 5 | 6 | let b:did_ftplugin = 1 7 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/template/gulpfile.coffee: -------------------------------------------------------------------------------- 1 | gulp = require 'gulp' 2 | 3 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/template/plugin/template.vim: -------------------------------------------------------------------------------- 1 | :% s@PLUGIN@\=expand('%:p:r:s?.*[/\\]plugin[/\\]??:gs?[/\\]?_?')@ge 2 | if exists('g:loaded_PLUGIN') 3 | finish 4 | endif 5 | let g:loaded_PLUGIN = 1 6 | 7 | 8 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/template/syntax/template.vim: -------------------------------------------------------------------------------- 1 | :keeppatterns % s/LANGUAGE_NAME/\=expand('%:t:r')/ge 2 | if exists('b:current_syntax') 3 | finish 4 | endif 5 | 6 | syntax case match 7 | syntax sync fromstart 8 | 9 | 10 | " Comments 11 | syntax match LANGUAGE_NAMEComment "" 12 | 13 | 14 | " highlight 15 | highlight default link LANGUAGE_NAMEComment Comment 16 | 17 | 18 | let b:current_syntax = 'LANGUAGE_NAME' 19 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/template/template.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | pushd %~dp0 3 | setlocal 4 | 5 | <+CURSOR+> 6 | 7 | endlocal 8 | popd 9 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/template/template.cs: -------------------------------------------------------------------------------- 1 | public class <%= expand("%:t:r") %> 2 | { 3 | <+CURSOR+> 4 | } 5 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/template/template.java: -------------------------------------------------------------------------------- 1 | :if expand('%:p:h') !=# getcwd() 2 | : 0put ='package ' . expand('%:p:h:gs?[/\\]?.?')[len(getcwd()) + 1 :] . ';' 3 | : 1put ='' 4 | :endif 5 | /** 6 | * 7 | */ 8 | public class <%= expand("%:t:r") %> { 9 | <+CURSOR+> 10 | } 11 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/template/template.partial.cs: -------------------------------------------------------------------------------- 1 | public partial class <%= expand("%:t:r:r") %> 2 | { 3 | <+CURSOR+> 4 | } 5 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/template/template.php: -------------------------------------------------------------------------------- 1 | ; 2 | use strict; 3 | use warnings; 4 | 5 | 1; 6 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/template/template.vim.bash: -------------------------------------------------------------------------------- 1 | vim -u NONE -i NONE -N -n -e -s -S <(cat < 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/template/templateException.java: -------------------------------------------------------------------------------- 1 | public class <%= expand("%:t:r") %> extends Exception{ 2 | public <%= expand("%:t:r") %>(){} 3 | 4 | public <%= expand("%:t:r") %>(String mes){ 5 | super(mes); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/template/templateTest.php: -------------------------------------------------------------------------------- 1 | extends PHPUnit_Framework_TestCase{ 5 | <+CURSOR+> 6 | } 7 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/template/test/template.themisrc: -------------------------------------------------------------------------------- 1 | call themis#option('recursive', 1) 2 | 3 | call themis#helper('command').with(themis#helper('assert')) 4 | -------------------------------------------------------------------------------- /dotfiles/dot.vim/vimshrc: -------------------------------------------------------------------------------- 1 | alias ls=ls -F 2 | alias ll=ls -l 3 | alias la=ls -lA 4 | 5 | alias sc=iexe scala -Xnojline 6 | 7 | alias v=vim 8 | alias s=svn 9 | alias b=bzr 10 | alias g=git 11 | 12 | galias G="| grep" 13 | -------------------------------------------------------------------------------- /dotfiles/dot.vrapperrc: -------------------------------------------------------------------------------- 1 | set ignorecase 2 | set smartcase 3 | 4 | noremap ; : 5 | noremap : ; 6 | 7 | noremap Y y$ 8 | 9 | noremap \w :w 10 | noremap w :w 11 | noremap \q :q 12 | 13 | vnoremap = :format 14 | 15 | nnoremap gc `[v`] 16 | 17 | noremap cw ce 18 | 19 | " inoremap u 20 | " inoremap u 21 | 22 | eclipseaction wordNext org.eclipse.ui.edit.text.goto.wordNext 23 | eclipseaction wordPrevious org.eclipse.ui.edit.text.goto.wordPrevious 24 | noremap gw :wordNext 25 | noremap gb :wordPrevious 26 | 27 | eclipseaction pageDown org.eclipse.ui.edit.text.goto.pageDown 28 | eclipseaction pageUp org.eclipse.ui.edit.text.goto.pageUp 29 | noremap K :pageDown 30 | noremap L :pageUp 31 | " noremap :pageDown 32 | " noremap :pageUp 33 | 34 | eclipseaction GoNextMember org.eclipse.jdt.ui.edit.text.java.goto.next.member 35 | nnoremap mn :GoNextMember 36 | eclipseaction GoPrevMember org.eclipse.jdt.ui.edit.text.java.goto.previous.member 37 | nnoremap mp :GoPrevMember 38 | 39 | eclipseaction SearchRef org.eclipse.jdt.ui.edit.text.java.search.references.in.project 40 | nnoremap mr :SearchRef 41 | 42 | " http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/api/org/eclipse/ui/texteditor/IWorkbenchActionDefinitionIds.html 43 | " http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/api/org/eclipse/ui/texteditor/ITextEditorActionDefinitionIds.html 44 | " http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclipse.jdt.doc.isv/reference/api/org/eclipse/jdt/ui/actions/IJavaEditorActionDefinitionIds.html 45 | -------------------------------------------------------------------------------- /dotfiles/dot.w3m/keymap: -------------------------------------------------------------------------------- 1 | keymap "g g" BEGIN 2 | 3 | keymap h MOVE_LEFT1 4 | keymap j MOVE_DOWN1 5 | keymap k MOVE_UP1 6 | keymap l MOVE_RIGHT1 7 | 8 | keymap b PREV_WORD 9 | 10 | keymap C-e UP 11 | keymap C-y DOWN 12 | 13 | keymap C-f NEXT_PAGE 14 | keymap C-b PREV_PAGE 15 | 16 | keymap o GOTO 17 | keymap t TAB_GOTO 18 | 19 | # Navigations. 20 | keymap H BACK 21 | keymap L NEXT 22 | 23 | # Tabs. 24 | keymap d CLOSE_TAB 25 | keymap "g t" NEXT_TAB 26 | keymap "g T" PREV_TAB 27 | keymap C-n NEXT_TAB 28 | keymap C-p PREV_TAB 29 | 30 | # Spacials. 31 | keymap C-h HELP 32 | keymap "g C-h" HISTORY 33 | -------------------------------------------------------------------------------- /dotfiles/dot.xinitrc: -------------------------------------------------------------------------------- 1 | #!/bin/zsh 2 | 3 | export LANG="ja_JP.UTF-8" 4 | # export XMODIFIERS="@im=SCIM" 5 | # export GTK_IM_MODULE=scim 6 | export XMODIFIERS="@im=ibus" 7 | export GTK_IM_MODULE="ibus" 8 | export QT_IM_MODULE="xim" 9 | 10 | which ibus-daemon &>/dev/null && ibus-daemon -d -x 11 | 12 | # Start URxvt daemon so we can quickly open the other clients 13 | which urxvtd &>/dev/null && urxvtd -q -o -f 14 | 15 | [ -f $HOME/.Xmodmap ] && xmodmap ~/.Xmodmap 16 | 17 | # which scim &>/dev/null && scim -d & 18 | 19 | which keychain &>/dev/null && eval $(keychain --eval --quiet) 20 | 21 | # for $PATH 22 | NOTMUX=1 source ~/.zshrc 23 | LANG=ja_JP.UTF-8 24 | 25 | which wicd-client &>/dev/null && wicd-client & 26 | 27 | exec ${1:-awesome} 28 | -------------------------------------------------------------------------------- /dotfiles/dot.xmonad/dzenGmailNotify.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | #======================================================================== 4 | # Copyright 2007 Raja 5 | # 6 | # This program is free software; you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation; either version 2 of the License, or 9 | # (at your option) any later version. 10 | # 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program; if not, write to the Free Software 18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | #========================================================================== 20 | 21 | # ====================================================================== 22 | # Modified from code originally written by Baishampayan Ghose 23 | # Copyright (C) 2006 Baishampayan Ghose 24 | # ====================================================================== 25 | 26 | 27 | import urllib 28 | import feedparser 29 | 30 | _url = "https://mail.google.com/gmail/feed/atom" 31 | 32 | ################## Edit here ####################### 33 | 34 | #pwd = xxxx # pwd stored in script 35 | _pwdfile = '/home/thinca/.xmonad/password' # pwd stored in a file 36 | _username = 'thinca' 37 | _calmcolor = 'white' 38 | _alertcolor = 'red' 39 | _maxmails = 5 # maximum new mails to show 40 | _maxwords = 3 # maximum words to show in each mail header 41 | 42 | ########################################################### 43 | 44 | class GmailRSSOpener(urllib.FancyURLopener): 45 | '''Logs on with stored password and username 46 | Password is stored in a hidden file in the home folder''' 47 | 48 | def prompt_user_passwd(self, host, realm): 49 | #uncomment line below if password directly entered in script. 50 | pwd = open(_pwdfile).read() 51 | return (_username, pwd) 52 | 53 | def auth(): 54 | '''The method to do HTTPBasicAuthentication''' 55 | opener = GmailRSSOpener() 56 | f = opener.open(_url) 57 | feed = f.read() 58 | return feed 59 | 60 | def showmail(feed): 61 | '''Parse the Atom feed and print a summary''' 62 | atom = feedparser.parse(feed) 63 | newmails = len(atom.entries) 64 | if newmails == 0: 65 | title = "^fg(%s) You have no new mails" % (_calmcolor) 66 | elif newmails == 1: 67 | title = "^fg(%s) You have 1 new mail" % (_alertcolor) 68 | else: 69 | title = "^fg(%s) You have %s new mails" % (_alertcolor,newmails) 70 | 71 | # print the title with formatting 72 | print "^tw()" +title 73 | #clear the slave window 74 | print "^cs()" 75 | 76 | #then print the messages 77 | for i in range(min(_maxmails,newmails)): 78 | 79 | emailtitle = atom.entries[i].title 80 | # show only first few words if title is too long 81 | if len(emailtitle.split()) > _maxwords: 82 | emailtitle = ' '.join(emailtitle.split()[:_maxwords]) 83 | 84 | print "^fg(%s) %s from %s" % (_calmcolor, emailtitle, atom.entries[i].author) 85 | 86 | if __name__ == "__main__": 87 | feed = auth() 88 | showmail(feed) 89 | -------------------------------------------------------------------------------- /dotfiles/dot.xmonad/genemailnotification.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | while true ; do 3 | python /home/thinca/.xmonad/dzenGmailNotify.py 4 | sleep 30 5 | done | dzen2 -ta r -l 5 -bg '#808080' -x 700 -w 380 6 | -------------------------------------------------------------------------------- /dotfiles/dot.xmonad/startup: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # if [ -x $HOME/.xmonad/status ]; then 4 | # $HOME/.xmonad/status | dzen2 -ta r -fn 'xft:M+2M+IPAG:size=12:antialias=true' -bg '#2c2c32' -fg 'grey70' -p -e '' & 5 | # fi 6 | 7 | exec xmonad 8 | -------------------------------------------------------------------------------- /dotfiles/dot.xmonad/status: -------------------------------------------------------------------------------- 1 | #!/bin/zsh 2 | # 3 | # xmonad statusline, (c) 2007 by Robert Manea 4 | # 5 | 6 | # Configuration 7 | DATE_FORMAT='%Y/%m/%d(%a) %H:%M:%S' 8 | DZEN_ICONPATH= 9 | #MAILDIR= 10 | 11 | # Main loop interval in seconds 12 | INTERVAL=1 13 | 14 | # function calling intervals in seconds 15 | DATEIVAL=1 16 | GTIMEIVAL=60 17 | MAILIVAL=60 18 | CPUTEMPIVAL=1 19 | WEATHERIVAL=1800 20 | 21 | # Functions 22 | fdate() { 23 | date +$DATE_FORMAT 24 | } 25 | 26 | fcputemp() { 27 | # print -n ${(@)$( $ xmodmap | grep Num 50 | -- > mod2 Num_Lock (0x4d) 51 | -- 52 | -- Set numlockMask = 0 if you don't have a numlock key, or want to treat 53 | -- numlock status separately. 54 | -- 55 | myNumlockMask = mod2Mask 56 | 57 | -- The default number of workspaces (virtual screens) and their names. 58 | -- By default we use numeric strings, but any string may be used as a 59 | -- workspace name. The number of workspaces is determined by the length 60 | -- of this list. 61 | -- 62 | -- A tagging example: 63 | -- 64 | -- > workspaces = ["web", "irc", "code" ] ++ map show [4..9] 65 | -- 66 | myWorkspaces = ["1","2","3","4","5","6","7","8","9"] 67 | 68 | -- Border colors for unfocused and focused windows, respectively. 69 | -- 70 | myNormalBorderColor = "#dddddd" 71 | myFocusedBorderColor = "#ff0000" 72 | 73 | ------------------------------------------------------------------------ 74 | -- Key bindings. Add, modify or remove key bindings here. 75 | -- 76 | myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList $ 77 | 78 | -- launch a terminal 79 | [ ((modm .|. shiftMask, xK_Return), spawn $ XMonad.terminal conf) 80 | 81 | -- launch dmenu 82 | , ((modm, xK_p ), spawn "exe=`dmenu_path | dmenu` && eval \"exec $exe\"") 83 | 84 | -- launch gmrun 85 | , ((modm .|. shiftMask, xK_p ), spawn "gmrun") 86 | 87 | -- close focused window 88 | , ((modm .|. shiftMask, xK_c ), kill) 89 | 90 | -- Rotate through the available layout algorithms 91 | , ((modm, xK_space ), sendMessage NextLayout) 92 | 93 | -- Reset the layouts on the current workspace to default 94 | , ((modm .|. shiftMask, xK_space ), setLayout $ XMonad.layoutHook conf) 95 | 96 | -- Resize viewed windows to the correct size 97 | , ((modm, xK_n ), refresh) 98 | 99 | -- Move focus to the next window 100 | , ((modm, xK_Tab ), windows W.focusDown) 101 | 102 | -- Move focus to the next window 103 | , ((modm, xK_j ), windows W.focusDown) 104 | 105 | -- Move focus to the previous window 106 | , ((modm, xK_k ), windows W.focusUp ) 107 | 108 | -- Move focus to the master window 109 | , ((modm, xK_m ), windows W.focusMaster ) 110 | 111 | -- Swap the focused window and the master window 112 | , ((modm, xK_Return), windows W.swapMaster) 113 | 114 | -- Swap the focused window with the next window 115 | , ((modm .|. shiftMask, xK_j ), windows W.swapDown ) 116 | 117 | -- Swap the focused window with the previous window 118 | , ((modm .|. shiftMask, xK_k ), windows W.swapUp ) 119 | 120 | -- Shrink the master area 121 | , ((modm, xK_h ), sendMessage Shrink) 122 | 123 | -- Expand the master area 124 | , ((modm, xK_l ), sendMessage Expand) 125 | 126 | -- Push window back into tiling 127 | , ((modm, xK_t ), withFocused $ windows . W.sink) 128 | 129 | -- Increment the number of windows in the master area 130 | , ((modm , xK_comma ), sendMessage (IncMasterN 1)) 131 | 132 | -- Deincrement the number of windows in the master area 133 | , ((modm , xK_period), sendMessage (IncMasterN (-1))) 134 | 135 | -- Toggle the status bar gap 136 | -- Use this binding with avoidStruts from Hooks.ManageDocks. 137 | -- See also the statusBar function from Hooks.DynamicLog. 138 | -- 139 | -- , ((modm , xK_b ), sendMessage ToggleStruts) 140 | 141 | -- Quit xmonad 142 | , ((modm .|. shiftMask, xK_q ), io (exitWith ExitSuccess)) 143 | 144 | -- Restart xmonad 145 | , ((modm , xK_q ), spawn "xmonad --recompile; xmonad --restart") 146 | ] 147 | ++ 148 | 149 | -- 150 | -- mod-[1..9], Switch to workspace N 151 | -- mod-shift-[1..9], Move client to workspace N 152 | -- 153 | [((m .|. modm, k), windows $ f i) 154 | | (i, k) <- zip (XMonad.workspaces conf) [xK_1 .. xK_9] 155 | , (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)]] 156 | ++ 157 | 158 | -- 159 | -- mod-{w,e,r}, Switch to physical/Xinerama screens 1, 2, or 3 160 | -- mod-shift-{w,e,r}, Move client to screen 1, 2, or 3 161 | -- 162 | [((m .|. modm, key), screenWorkspace sc >>= flip whenJust (windows . f)) 163 | | (key, sc) <- zip [xK_w, xK_e, xK_r] [0..] 164 | , (f, m) <- [(W.view, 0), (W.shift, shiftMask)]] 165 | 166 | 167 | ------------------------------------------------------------------------ 168 | -- Mouse bindings: default actions bound to mouse events 169 | -- 170 | myMouseBindings (XConfig {XMonad.modMask = modm}) = M.fromList $ 171 | 172 | -- mod-button1, Set the window to floating mode and move by dragging 173 | [ ((modm, button1), (\w -> focus w >> mouseMoveWindow w 174 | >> windows W.shiftMaster)) 175 | 176 | -- mod-button2, Raise the window to the top of the stack 177 | , ((modm, button2), (\w -> focus w >> windows W.shiftMaster)) 178 | 179 | -- mod-button3, Set the window to floating mode and resize by dragging 180 | , ((modm, button3), (\w -> focus w >> mouseResizeWindow w 181 | >> windows W.shiftMaster)) 182 | 183 | -- you may also bind events to the mouse scroll wheel (button4 and button5) 184 | ] 185 | 186 | ------------------------------------------------------------------------ 187 | -- Layouts: 188 | 189 | -- You can specify and transform your layouts by modifying these values. 190 | -- If you change layout bindings be sure to use 'mod-shift-space' after 191 | -- restarting (with 'mod-q') to reset your layout state to the new 192 | -- defaults, as xmonad preserves your old layout settings by default. 193 | -- 194 | -- The available layouts. Note that each layout is separated by |||, 195 | -- which denotes layout choice. 196 | -- 197 | myLayout = tiled ||| Mirror tiled ||| Full 198 | where 199 | -- default tiling algorithm partitions the screen into two panes 200 | tiled = Tall nmaster delta ratio 201 | 202 | -- The default number of windows in the master pane 203 | nmaster = 1 204 | 205 | -- Default proportion of screen occupied by master pane 206 | ratio = 1/2 207 | 208 | -- Percent of screen to increment by when resizing panes 209 | delta = 3/100 210 | 211 | ------------------------------------------------------------------------ 212 | -- Window rules: 213 | 214 | -- Execute arbitrary actions and WindowSet manipulations when managing 215 | -- a new window. You can use this to, for example, always float a 216 | -- particular program, or have a client always appear on a particular 217 | -- workspace. 218 | -- 219 | -- To find the property name associated with a program, use 220 | -- > xprop | grep WM_CLASS 221 | -- and click on the client you're interested in. 222 | -- 223 | -- To match on the WM_NAME, you can use 'title' in the same way that 224 | -- 'className' and 'resource' are used below. 225 | -- 226 | myManageHook = composeAll 227 | [ className =? "MPlayer" --> doFloat 228 | , className =? "Gimp" --> doFloat 229 | , resource =? "desktop_window" --> doIgnore 230 | , resource =? "kdesktop" --> doIgnore ] 231 | 232 | ------------------------------------------------------------------------ 233 | -- Event handling 234 | 235 | -- * EwmhDesktops users should change this to ewmhDesktopsEventHook 236 | -- 237 | -- Defines a custom handler function for X Events. The function should 238 | -- return (All True) if the default handler is to be run afterwards. To 239 | -- combine event hooks use mappend or mconcat from Data.Monoid. 240 | -- 241 | myEventHook = mempty 242 | 243 | ------------------------------------------------------------------------ 244 | -- Status bars and logging 245 | 246 | -- Perform an arbitrary action on each internal state change or X event. 247 | -- See the 'DynamicLog' extension for examples. 248 | -- 249 | -- To emulate dwm's status bar 250 | -- 251 | -- > logHook = dynamicLogDzen 252 | -- 253 | myLogHook = return () 254 | 255 | ------------------------------------------------------------------------ 256 | -- Startup hook 257 | 258 | -- Perform an arbitrary action each time xmonad starts or is restarted 259 | -- with mod-q. Used by, e.g., XMonad.Layout.PerWorkspace to initialize 260 | -- per-workspace layout choices. 261 | -- 262 | -- By default, do nothing. 263 | myStartupHook = return () 264 | 265 | ------------------------------------------------------------------------ 266 | -- Now run xmonad with all the defaults we set up. 267 | 268 | -- Run xmonad with the settings you specify. No need to modify this. 269 | -- 270 | main = xmonad =<< dzen defaults 271 | 272 | -- A structure containing your configuration settings, overriding 273 | -- fields in the default config. Any you don't override, will 274 | -- use the defaults defined in xmonad/XMonad/Config.hs 275 | -- 276 | -- No need to modify this. 277 | -- 278 | defaults = defaultConfig { 279 | -- simple stuff 280 | terminal = myTerminal, 281 | focusFollowsMouse = myFocusFollowsMouse, 282 | borderWidth = myBorderWidth, 283 | modMask = myModMask, 284 | numlockMask = myNumlockMask, 285 | workspaces = myWorkspaces, 286 | normalBorderColor = myNormalBorderColor, 287 | focusedBorderColor = myFocusedBorderColor, 288 | 289 | -- key bindings 290 | keys = myKeys, 291 | mouseBindings = myMouseBindings, 292 | 293 | -- hooks, layouts 294 | layoutHook = myLayout, 295 | manageHook = myManageHook, 296 | handleEventHook = myEventHook, 297 | logHook = myLogHook, 298 | startupHook = myStartupHook 299 | } 300 | -------------------------------------------------------------------------------- /dotfiles/dot.zsh/mac.zsh: -------------------------------------------------------------------------------- 1 | # brew install coreutils 2 | path=(/usr/local/opt/*/libexec/gnubin(N-/) $path) 3 | manpath=(/usr/local/opt/*/libexec/gnuman(N-/) $manpath) 4 | -------------------------------------------------------------------------------- /dotfiles/dot.zsh/scripts/cargo.zsh: -------------------------------------------------------------------------------- 1 | path=(~/.cargo/bin(N-/) $path) 2 | -------------------------------------------------------------------------------- /dotfiles/dot.zsh/scripts/direnv.zsh: -------------------------------------------------------------------------------- 1 | if type direnv &>/dev/null; then 2 | eval "$(direnv hook zsh)" 3 | fi 4 | 5 | -------------------------------------------------------------------------------- /dotfiles/dot.zsh/scripts/docker.zsh: -------------------------------------------------------------------------------- 1 | export DOCKER_BUILDKIT=1 2 | -------------------------------------------------------------------------------- /dotfiles/dot.zsh/scripts/fzf.zsh: -------------------------------------------------------------------------------- 1 | export FZF_DEFAULT_OPTS='--no-mouse --bind "?:toggle-preview,ctrl-a:select-all,ctrl-d:preview-page-down,ctrl-u:preview-page-up"' 2 | -------------------------------------------------------------------------------- /dotfiles/dot.zsh/scripts/go.zsh: -------------------------------------------------------------------------------- 1 | # Go language 2 | export GOPATH=~/.local/share/go 3 | path=($GOPATH/bin(N-/) $path) 4 | -------------------------------------------------------------------------------- /dotfiles/dot.zsh/scripts/haskell.zsh: -------------------------------------------------------------------------------- 1 | # Haskell cabal 2 | path=(~/.cabal/bin(N-/) $path) 3 | 4 | # href - reference for haskell 5 | export HREF_DATADIR=~/share/doc/href 6 | compctl -K _href href 7 | functions _href() { 8 | reply=($(cat $HREF_DATADIR/comptable|awk -F, '{print $2}'|sort|uniq)) 9 | } 10 | 11 | alias -s hs=runghc 12 | -------------------------------------------------------------------------------- /dotfiles/dot.zsh/scripts/kvm.zsh: -------------------------------------------------------------------------------- 1 | [ -s ~/.k/kvm/kvm.sh ] && . ~/.k/kvm/kvm.sh 2 | -------------------------------------------------------------------------------- /dotfiles/dot.zsh/scripts/man.zsh: -------------------------------------------------------------------------------- 1 | manpath=(~/local/share/man(N-/) $manpath) 2 | -------------------------------------------------------------------------------- /dotfiles/dot.zsh/scripts/mise.zsh: -------------------------------------------------------------------------------- 1 | if [[ ! -f ~/.local/bin/mise ]]; then 2 | curl https://mise.run | sh 3 | mkdir -p ~/.zsh/functions/Completion 4 | mise completion zsh > ~/.zsh/functions/Completion/_mise 5 | fi 6 | eval "$(~/.local/bin/mise activate zsh)" 7 | 8 | export RUBY_CONFIGURE_OPTS="--enable-shared" 9 | export PYTHON_CONFIGURE_OPTS="--enable-shared" 10 | # Need patch to asdf-perl 11 | export PERL_CONFIGURE_OPTS="-Duseshrplib" 12 | export ASDF_RACKET_CONFIG_FLAGS="--enable-bcdefault --disable-futures --disable-places --disable-gracket --disable-docs" 13 | if [[ "${SYSTEM_NAME}" != "mac" ]]; then 14 | ASDF_RACKET_CONFIG_FLAGS="--enable-dynlib ${ASDF_RACKET_CONFIG_FLAGS}" 15 | fi 16 | export NODEJS_CHECK_SIGNATURES="no" 17 | -------------------------------------------------------------------------------- /dotfiles/dot.zsh/scripts/node.zsh: -------------------------------------------------------------------------------- 1 | path=(./node_modules/.bin $path) 2 | if [[ -d ~/.local/share/mise ]]; then 3 | manpath=($(mise where nodejs)/.npm/share/man(N-/) $manpath) 4 | fi 5 | -------------------------------------------------------------------------------- /dotfiles/dot.zsh/scripts/ruby.zsh: -------------------------------------------------------------------------------- 1 | unset RUBYOPT 2 | 3 | path=(./.bundle/bin $path) 4 | 5 | alias -s rb=ruby 6 | alias bi='bundle install --jobs=$(nproc)' 7 | 8 | function __chpwd_on_gemfile_local() { 9 | if [[ -f "Gemfile.private" ]]; then 10 | export BUNDLE_GEMFILE="./Gemfile.private" 11 | else 12 | unset BUNDLE_GEMFILE 13 | fi 14 | } 15 | add-zsh-hook chpwd __chpwd_on_gemfile_local 16 | 17 | function __precmd_update_gemfile_local_lock() { 18 | if [[ \ 19 | -d '.bundle' && \ 20 | -n "${BUNDLE_GEMFILE}" && \ 21 | -f "${BUNDLE_GEMFILE}" && \ 22 | ( ! -f "${BUNDLE_GEMFILE}.lock" || \ 23 | ( "Gemfile.lock" -nt "${BUNDLE_GEMFILE}.lock" ) ) ]]; then 24 | cp "Gemfile.lock" "${BUNDLE_GEMFILE}.lock" 25 | bundle install 26 | fi 27 | } 28 | add-zsh-hook precmd __precmd_update_gemfile_local_lock 29 | -------------------------------------------------------------------------------- /dotfiles/dot.zsh/scripts/rust.zsh: -------------------------------------------------------------------------------- 1 | path=(~/.cargo/bin(N-/) $path) 2 | -------------------------------------------------------------------------------- /dotfiles/dot.zsh/scripts/vcs.zsh: -------------------------------------------------------------------------------- 1 | alias s=svn 2 | alias g=git 3 | -------------------------------------------------------------------------------- /dotfiles/dot.zsh/scripts/vim.zsh: -------------------------------------------------------------------------------- 1 | alias v="vim" 2 | 3 | # Plain vim 4 | alias pvim="vim -u NONE -i NONE -N -n" 5 | 6 | export VOLTPATH=$HOME/.local/share/vim/volt 7 | -------------------------------------------------------------------------------- /dotfiles/dot.zsh/system: -------------------------------------------------------------------------------- 1 | # The system detection. 2 | if [[ -f /etc/redhat-release ]]; then 3 | SYSTEM_NAME=redhat 4 | elif [[ -f /etc/SuSE-release ]]; then 5 | SYSTEM_NAME=suse 6 | elif [[ -f /etc/debian_version ]]; then 7 | SYSTEM_NAME=debian 8 | elif [[ -f /etc/gentoo-release ]]; then 9 | SYSTEM_NAME=gentoo 10 | elif [[ -f /etc/arch-release ]]; then 11 | SYSTEM_NAME=arch 12 | elif [[ -f /etc/slackware-version ]]; then 13 | SYSTEM_NAME=slackware 14 | elif [[ -f /etc/lfs-release ]]; then 15 | SYSTEM_NAME=lfs 16 | elif [[ ! -d /proc ]]; then 17 | SYSTEM_NAME=mac 18 | else 19 | SYSTEM_NAME=unknown 20 | fi 21 | export SYSTEM_NAME 22 | -------------------------------------------------------------------------------- /dotfiles/dot.zsh/tmux: -------------------------------------------------------------------------------- 1 | if type tmux &>/dev/null && \ 2 | [[ -z "${NOTMUX}" && "${EUID}" != "0" && "${USER}" != "root" && \ 3 | -z "${WINDOW}" && -z "${TMUX}" && (-n "${SSH_CLIENT}" || -n "${TMUX_INIT_SESSION}") ]] then 4 | # session=${SSH_CLIENT%% *} 5 | session="${TMUX_INIT_SESSION:-main}" 6 | 7 | exec tmux -2 -u new-session -s "${session}" -A 8 | fi 9 | -------------------------------------------------------------------------------- /dotfiles/dot.zshrc: -------------------------------------------------------------------------------- 1 | ########################################################################### 2 | # The system detection. 3 | [[ -f ~/.zsh/system ]] && source ~/.zsh/system 4 | 5 | # Disable ^Q and ^S. 6 | stty -ixon 7 | 8 | autoload -U colors 9 | colors 10 | 11 | autoload -U url-quote-magic 12 | 13 | zle -N self-insert url-quote-magic 14 | 15 | # Historical backward/forward search with linehead string. 16 | autoload history-search-end 17 | zle -N history-beginning-search-backward-end history-search-end 18 | zle -N history-beginning-search-forward-end history-search-end 19 | 20 | autoload zmv 21 | alias zmv='noglob zmv -W' 22 | 23 | # Use zed - a text editor written by zsh. 24 | autoload zed 25 | 26 | 27 | ########################################################################### 28 | # Environment variables. 29 | if [[ "${TERM}" == "linux" ]]; then 30 | export LANG=en_US.UTF-8 31 | else 32 | export LANG=ja_JP.UTF-8 33 | fi 34 | if [[ -n "${FORCE_LANG}" ]]; then 35 | export LANG="${FORCE_LANG}" 36 | fi 37 | 38 | if [[ -d ~/share/Dropbox ]]; then 39 | export DROPBOX_HOME=~/share/Dropbox 40 | path=("${DROPBOX_HOME}"/bin(N-/) $path) 41 | fi 42 | 43 | if [[ "${TERM}" == "rxvt-unicode" ]]; then 44 | TERM=xterm-256color 45 | fi 46 | 47 | # An option like "--quit-if-one-screen" of "less" is not exist in lv... 48 | # export PAGER=lv 49 | # export LV='-c' 50 | export PAGER=less 51 | export LESS='--no-init --LONG-PROMPT --ignore-case --silent --quit-if-one-screen --RAW-CONTROL-CHARS' 52 | export LESSHISTFILE=- 53 | 54 | export EDITOR=vim 55 | 56 | # GnuPG 57 | export GPG_TTY=$(tty) 58 | 59 | 60 | ########################################################################### 61 | # Options. 62 | 63 | # allow tab completion in the middle of a word 64 | setopt complete_in_word 65 | 66 | ## keep background processes at full speed 67 | #setopt NOBGNICE 68 | ## restart running processes on exit 69 | #setopt HUP 70 | 71 | ## history 72 | #setopt APPEND_HISTORY 73 | ## for sharing history between zsh processes 74 | #setopt INC_APPEND_HISTORY 75 | HISTFILE=$HOME/.zsh_history 76 | HISTSIZE=100000 77 | SAVEHIST=100000 78 | setopt hist_ignore_all_dups 79 | setopt hist_ignore_space 80 | setopt hist_reduce_blanks 81 | setopt share_history 82 | setopt extended_history 83 | setopt hist_no_store 84 | 85 | ## never ever beep ever 86 | setopt no_beep 87 | 88 | # Perform cd if command is directory. 89 | setopt auto_cd 90 | # Make cd push the old directory onto the directory stack. 91 | setopt auto_pushd 92 | # Do not push multiple copies of the same directory onto the directory stack. 93 | setopt pushd_ignore_dups 94 | # setopt correct 95 | setopt list_packed 96 | # Treat single word simple commands without redirection as candidates for 97 | # resumption of an existing job. 98 | setopt auto_resume 99 | # disable flow control with Ctrl-S/Ctrl-Q 100 | setopt no_flow_control 101 | 102 | setopt multios 103 | 104 | setopt extended_glob 105 | 106 | # Enable {a-z} 107 | setopt brace_ccl 108 | 109 | ## automatically decide when to page a list of completions 110 | #LISTMAX=0 111 | 112 | ## disable mail checking 113 | #MAILCHECK=0 114 | 115 | 116 | ########################################################################### 117 | # Style settings. 118 | export CLICOLOR=1 119 | export LSCOLORS=gxfxxxxxcxxxxxxxxxgxgx 120 | export LS_COLORS='di=01;36:ln=01;35:ex=01;32' 121 | zstyle ':completion:*' list-colors 'di=36' 'ln=35' 'ex=32' 122 | #zstyle ':completion:*' list-colors '' 123 | #zstyle ':completion::complete:*' use-cache 1 124 | 125 | zstyle ':completion:*' verbose yes 126 | zstyle ':completion:*:descriptions' format '%B%d%b' 127 | zstyle ':completion:*:messages' format '%d' 128 | zstyle ':completion:*:warnings' format 'No matches for: %d' 129 | zstyle ':completion:*' group-name '' 130 | zstyle ':completion:*' matcher-list '' 'm:{a-z}={A-Z}' '+m:{A-Z}={a-z}' 131 | zstyle ':completion:*:(processes|jobs)' menu yes select=2 132 | 133 | # auto-fu.zsh 134 | # bindkey -N isearch 135 | # { . ~/.zsh/auto-fu; auto-fu-install; } 136 | # zstyle ':auto-fu:highlight' input white,bold 137 | # zstyle ':auto-fu:highlight' completion fg=gray 138 | # zstyle ':auto-fu:var' postdisplay '' 139 | # zle-line-init () {auto-fu-init;}; zle -N zle-line-init 140 | 141 | 142 | ########################################################################### 143 | # Prompt settings. 144 | 145 | # Expand the environment variable in prompt. 146 | setopt prompt_subst 147 | 148 | # Normal prompt. 149 | PROMPT=" 150 | %B%(#.${fg[yellow]}.${fg[green]})[%n@%m]%~ ${fg[magenta]}%1v%(?.. ${fg[red]}%?${reset_color})${reset_color}%b 151 | %# " 152 | 153 | if [[ ! -f ~/.local/share/powerlevel10k/powerlevel10k.zsh-theme ]] && type git >/dev/null; then 154 | git clone https://github.com/romkatv/powerlevel10k ~/.local/share/powerlevel10k 155 | fi 156 | if [[ -f ~/.local/share/powerlevel10k/powerlevel10k.zsh-theme ]]; then 157 | [[ ! -f ~/.zsh/p10k.zsh ]] || source ~/.zsh/p10k.zsh 158 | source ~/.local/share/powerlevel10k/powerlevel10k.zsh-theme 159 | fi 160 | 161 | 162 | ########################################################################### 163 | # aliases. 164 | if type eza >/dev/null; then 165 | alias ls='eza --classify=auto --group-directories-first' 166 | alias ll='eza --classify=auto --group-directories-first --long' 167 | alias la='eza --classify=auto --group-directories-first --long --all' 168 | alias tree='eza --classify=auto --group-directories-first --tree' 169 | alias treel='eza --classify=auto --group-directories-first --tree --long' 170 | else 171 | alias ls='ls -F --color=auto' 172 | alias ll='ls -Fl --color=auto' 173 | alias la='ls -FlA --color=auto' 174 | alias tree='tree -F --dirsfirst' 175 | fi 176 | 177 | # Enable alias on sudo 178 | alias sudo='sudo ' 179 | 180 | # Usage: etime vim 181 | alias etime='ps -o cmd,etime -C' 182 | 183 | # replace rm 184 | if [[ -e /etc/bsnap/home-rm ]]; then 185 | rm() { 186 | local arg snap=no will_err=no paths=() 187 | for arg in "$@"; do 188 | if [[ "${arg[1]}" != "-" ]]; then 189 | paths+=("${arg}") 190 | if [[ ! -e "${arg}" ]]; then 191 | will_err=yes 192 | elif [[ "$(realpath ${arg})" =~ ^"${HOME}" ]]; then 193 | snap=yes 194 | fi 195 | fi 196 | done 197 | if [[ "${snap}" == "yes" && "${will_err}" == "no" ]]; then 198 | bsnap -c home-rm create "$(basename "${paths[1]}")" 199 | command rm -fr "${paths[@]}" 200 | else 201 | command rm "$@" 202 | fi 203 | } 204 | elif type trash-put &>/dev/null; then 205 | alias rm=trash-put 206 | fi 207 | alias del=/bin/rm 208 | 209 | # global aliases. 210 | alias -g L="| ${PAGER}" 211 | alias -g G="| grep $1" 212 | alias -g V="| vim -R -" 213 | 214 | alias -g NL='>/dev/null' 215 | alias -g NLL='&>/dev/null' 216 | 217 | 218 | ########################################################################### 219 | # key bindings. 220 | bindkey -v '^n' history-beginning-search-forward-end 221 | bindkey -v '^p' history-beginning-search-backward-end 222 | bindkey -v '^q' push-line 223 | bindkey -a '/' history-incremental-search-backward 224 | bindkey -a '?' history-incremental-search-forward 225 | bindkey -a 'q' push-line 226 | bindkey -a 'u' undo 227 | bindkey -a '\C-r' redo 228 | 229 | 230 | ########################################################################### 231 | # Functions for this file. 232 | 233 | function __is_screen() { 234 | if [[ ((-n "${WINDOW}" && -z "${DISPLAY}") || -n "${TMUX}") && -z "${VIM}" ]]; then 235 | return 0 236 | fi 237 | return 1 238 | } 239 | 240 | function __is_prefix_cmd() { 241 | local cmd="$1" 242 | [[ "${cmd}" == "rlwrap" ]] && return 0 243 | [[ "${cmd}" == *=* ]] && return 0 244 | return 1 245 | } 246 | 247 | function screen-name() { 248 | echo -ne "\ek$1\e\\" 249 | } 250 | 251 | ########################################################################### 252 | # hook functions. 253 | autoload -Uz add-zsh-hook 254 | 255 | # on GNU Screen or tmux 256 | if __is_screen; then 257 | function __preexec_on_screen() { 258 | local line="$3" 259 | local args=("${(z)line}") 260 | local cmd 261 | if [[ "${(t)args}" == "array-local" ]]; then 262 | while __is_prefix_cmd "${args[1]}" 263 | do 264 | shift args 265 | done 266 | cmd="${args[1]}" 267 | else 268 | cmd="${args}" 269 | fi 270 | shift 1 args 2>/dev/null 271 | case "${cmd}" in 272 | man|ssh) 273 | screen-name "${cmd}:${args[*]}" 274 | ;; 275 | *) 276 | screen-name "#${cmd}" 277 | ;; 278 | esac 279 | } 280 | function __precmd_on_screen() { 281 | local d 282 | if [[ "${PWD}" == "${HOME}" ]]; then 283 | d='~' 284 | else 285 | d="${PWD:t}" 286 | fi 287 | screen-name "${d}/" 288 | } 289 | add-zsh-hook preexec __preexec_on_screen 290 | add-zsh-hook precmd __precmd_on_screen 291 | 292 | function tmux-session-refresh() { 293 | unset $(tmux show-env | sed -n 's/^-//p') 294 | eval export $(tmux show-env | sed -n 's/$/"/; s/=/="/p') 295 | } 296 | fi 297 | 298 | ########################################################################### 299 | # Load other scripts. 300 | 301 | () { 302 | local f 303 | for f in ~/.zsh/scripts/*.zsh(N); do 304 | [[ -r "${f}" ]] && source "${f}" 305 | done 306 | } 307 | 308 | path=(~/.local/bin(N-/) $path) 309 | 310 | [[ -r ~/.zsh/"${SYSTEM_NAME}".zsh ]] && source ~/.zsh/"${SYSTEM_NAME}".zsh 311 | [[ -r ~/.config/zsh/local.zsh ]] && source ~/.config/zsh/local.zsh 312 | 313 | # Delete the duplicate entry. 314 | typeset -U path 315 | typeset -U manpath 316 | 317 | # Automatically start Tmux session 318 | [[ -f ~/.zsh/tmux ]] && source ~/.zsh/tmux 319 | 320 | fpath=(~/.zsh/functions/Completion(N-/) $fpath) 321 | autoload -U compinit 322 | compinit 323 | 324 | # vim: ft=zsh 325 | -------------------------------------------------------------------------------- /firefox/firegestures.sqlite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thinca/config/748c788067601e3fcb2282449a5417ea3c73d1f2/firefox/firegestures.sqlite -------------------------------------------------------------------------------- /firefox/tabgroups-prefs.json: -------------------------------------------------------------------------------- 1 | {"tabGroups":"2.1.3","quickAccessButton":true,"groupTitleInButton":true,"displayMode":"single","searchMode":"highlight","showGroupThumbs":true,"gridDynamicSize":true,"closeIfEmpty":true,"sortGroupsByName":false,"showTabCounter":true,"stackTabs":true,"showThumbs":true,"showUrls":true,"tileIcons":true,"tabViewKeycode":"E","tabViewAccel":true,"tabViewShift":true,"tabViewAlt":false,"tabViewCtrl":true,"quickAccessKeycode":"R","quickAccessAccel":true,"quickAccessShift":true,"quickAccessAlt":false,"quickAccessCtrl":false,"nextGroupKeycode":">","nextGroupAccel":true,"nextGroupShift":true,"nextGroupAlt":false,"nextGroupCtrl":false,"previousGroupKeycode":"<","previousGroupAccel":true,"previousGroupShift":true,"previousGroupAlt":false,"previousGroupCtrl":false,"noWarningsAboutSession":false,"forceBrightText":0,"overrideViewportRatio":"","pageAutoChanged":true,"migratedWidget":true,"migratedPrefs":true,"migratedKeysets":true} -------------------------------------------------------------------------------- /mac/Library/LaunchAgents/lemonade.server.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Label 6 | lemonade.server 7 | KeepAlive 8 | 9 | ProgramArguments 10 | 11 | /Users/motoki.komaba/.go/bin/lemonade 12 | server 13 | 14 | RunAtLoad 15 | 16 | EnvironmentVariables 17 | 18 | LANG 19 | ja_JP.UTF-8 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /mac/brew.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -eu 4 | 5 | brew install coreutils diffutils findutils ed gnu-sed gnu-tar gzip unzip unrar grep gawk \ 6 | jq wget curl sqlite tree htop zsh git tmux ctags 7 | -------------------------------------------------------------------------------- /mac/karabiner/import.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cli=/Applications/Karabiner.app/Contents/Library/bin/karabiner 4 | 5 | $cli set option.jis_emacsmode_controlLeftbracket 1 6 | /bin/echo -n . 7 | $cli set private.tmux 1 8 | /bin/echo -n . 9 | $cli set remap.jis_eisuu2commandL_eisuu 1 10 | /bin/echo -n . 11 | $cli set repeat.initial_wait 416 12 | /bin/echo -n . 13 | $cli set option.emacsmode_controlH 1 14 | /bin/echo -n . 15 | $cli set option.emacsmode_controlM 1 16 | /bin/echo -n . 17 | $cli set repeat.wait 33 18 | /bin/echo -n . 19 | $cli set remap.app_google_chrome_disable_close_tab_on_google_translate 1 20 | /bin/echo -n . 21 | $cli set option.emacsmode_controlLeftbracket 1 22 | /bin/echo -n . 23 | $cli set remap.app_google_chrome_controlT2commandT 1 24 | /bin/echo -n . 25 | $cli set remap.app_google_chrome_controlL2commandL 1 26 | /bin/echo -n . 27 | $cli set option.vimode_commandl_hjkl 1 28 | /bin/echo -n . 29 | $cli set remap.app_google_chrome_disable_close_tab_on_gmail 1 30 | /bin/echo -n . 31 | $cli set remap.jis_underscore2backslash 1 32 | /bin/echo -n . 33 | $cli set private.slack 1 34 | /bin/echo -n . 35 | $cli set private.global.media 1 36 | /bin/echo -n . 37 | $cli set remap.app_google_chrome_disable_close_tab_on_google_calendar 1 38 | /bin/echo -n . 39 | $cli set remap.app_google_chrome_controlW2commandW 1 40 | /bin/echo -n . 41 | /bin/echo 42 | -------------------------------------------------------------------------------- /mac/karabiner/private.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | Private settings 8 | 9 | tmux support in Terminal 10 | private.tmux 11 | 12 | TERMINAL 13 | 14 | __KeyToKey__ 15 | KeyCode::C, ModifierFlag::COMMAND_L, 16 | KeyCode::Z, ModifierFlag::CONTROL_L, KeyCode::C 17 | 18 | 19 | __KeyToKey__ 20 | KeyCode::N, ModifierFlag::COMMAND_L, 21 | KeyCode::Z, ModifierFlag::CONTROL_L, KeyCode::N 22 | 23 | 24 | __KeyToKey__ 25 | KeyCode::P, ModifierFlag::COMMAND_L, 26 | KeyCode::Z, ModifierFlag::CONTROL_L, KeyCode::P 27 | 28 | 29 | __KeyToKey__ 30 | KeyCode::0, ModifierFlag::COMMAND_L, 31 | KeyCode::Z, ModifierFlag::CONTROL_L, KeyCode::0 32 | 33 | 34 | __KeyToKey__ 35 | KeyCode::1, ModifierFlag::COMMAND_L, 36 | KeyCode::Z, ModifierFlag::CONTROL_L, KeyCode::1 37 | 38 | 39 | __KeyToKey__ 40 | KeyCode::2, ModifierFlag::COMMAND_L, 41 | KeyCode::Z, ModifierFlag::CONTROL_L, KeyCode::2 42 | 43 | 44 | __KeyToKey__ 45 | KeyCode::3, ModifierFlag::COMMAND_L, 46 | KeyCode::Z, ModifierFlag::CONTROL_L, KeyCode::3 47 | 48 | 49 | __KeyToKey__ 50 | KeyCode::4, ModifierFlag::COMMAND_L, 51 | KeyCode::Z, ModifierFlag::CONTROL_L, KeyCode::4 52 | 53 | 54 | __KeyToKey__ 55 | KeyCode::5, ModifierFlag::COMMAND_L, 56 | KeyCode::Z, ModifierFlag::CONTROL_L, KeyCode::5 57 | 58 | 59 | __KeyToKey__ 60 | KeyCode::6, ModifierFlag::COMMAND_L, 61 | KeyCode::Z, ModifierFlag::CONTROL_L, KeyCode::6 62 | 63 | 64 | __KeyToKey__ 65 | KeyCode::7, ModifierFlag::COMMAND_L, 66 | KeyCode::Z, ModifierFlag::CONTROL_L, KeyCode::7 67 | 68 | 69 | __KeyToKey__ 70 | KeyCode::8, ModifierFlag::COMMAND_L, 71 | KeyCode::Z, ModifierFlag::CONTROL_L, KeyCode::8 72 | 73 | 74 | __KeyToKey__ 75 | KeyCode::9, ModifierFlag::COMMAND_L, 76 | KeyCode::Z, ModifierFlag::CONTROL_L, KeyCode::9 77 | 78 | 79 | 80 | __KeyToKey__ 81 | KeyCode::BRACKET_RIGHT, ModifierFlag::COMMAND_L, 82 | KeyCode::Z, ModifierFlag::CONTROL_L, KeyCode::BRACKET_RIGHT 83 | 84 | 85 | __KeyToKey__ 86 | KeyCode::BACKSLASH, ModifierFlag::COMMAND_L, 87 | KeyCode::Z, ModifierFlag::CONTROL_L, KeyCode::BACKSLASH 88 | 89 | 90 | 91 | __KeyToKey__ 92 | KeyCode::COMMA, ModifierFlag::COMMAND_L, 93 | KeyCode::BRACKET_RIGHT, ModifierFlag::COMMAND_L | ModifierFlag::SHIFT_L 94 | 95 | 96 | __KeyToKey__ 97 | KeyCode::DOT, ModifierFlag::COMMAND_L, 98 | KeyCode::BACKSLASH, ModifierFlag::COMMAND_L | ModifierFlag::SHIFT_L 99 | 100 | 101 | 102 | 103 | Slack support 104 | private.slack 105 | 106 | Slack 107 | 108 | __KeyToKey__ 109 | KeyCode::K, ModifierFlag::CONTROL_L, 110 | KeyCode::K, ModifierFlag::COMMAND_L 111 | 112 | 113 | __KeyToKey__ 114 | KeyCode::N, ModifierFlag::CONTROL_L, 115 | KeyCode::CURSOR_DOWN, ModifierFlag::OPTION_L | ModifierFlag::SHIFT_L 116 | 117 | 118 | __KeyToKey__ 119 | KeyCode::P, ModifierFlag::CONTROL_L, 120 | KeyCode::CURSOR_UP, ModifierFlag::OPTION_L | ModifierFlag::SHIFT_L 121 | 122 | 123 | 124 | 125 | Global Hotkey for Media Player 126 | private.global.media 127 | 128 | 129 | __KeyToKey__ 130 | KeyCode::P, ModifierFlag::OPTION_L, 131 | KeyCode::VK_IOHIDPOSTEVENT_NX_KEYTYPE_PLAY 132 | 133 | 134 | __KeyToKey__ 135 | KeyCode::L, ModifierFlag::OPTION_L, 136 | KeyCode::VK_IOHIDPOSTEVENT_NX_KEYTYPE_NEXT 137 | 138 | 139 | __KeyToKey__ 140 | KeyCode::H, ModifierFlag::OPTION_L, 141 | KeyCode::VK_IOHIDPOSTEVENT_NX_KEYTYPE_PREVIOUS 142 | 143 | 144 | __KeyToKey__ 145 | KeyCode::M, ModifierFlag::OPTION_L, 146 | KeyCode::VK_IOHIDPOSTEVENT_NX_KEYTYPE_MUTE 147 | 148 | 149 | __KeyToKey__ 150 | KeyCode::U, ModifierFlag::OPTION_L, 151 | KeyCode::VK_IOHIDPOSTEVENT_NX_KEYTYPE_SOUND_UP 152 | 153 | 154 | __KeyToKey__ 155 | KeyCode::D, ModifierFlag::OPTION_L, 156 | KeyCode::VK_IOHIDPOSTEVENT_NX_KEYTYPE_SOUND_DOWN 157 | 158 | 159 | 160 | 161 | -------------------------------------------------------------------------------- /mac/karabiner/save.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -eu 4 | 5 | basedir="$(realpath "$(dirname "$0")")" 6 | 7 | /Applications/Karabiner.app/Contents/Library/bin/karabiner export > "${basedir}/import.sh" 8 | -------------------------------------------------------------------------------- /mac/setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -eu 4 | 5 | basedir="$(realpath "$(dirname "$0")")" 6 | 7 | karabiner="/Applications/Karabiner.app/Contents/Library/bin/karabiner" 8 | if [[ -x "${karabiner}" ]]; then 9 | echo "Karabiner: restore settings" 10 | bash "${basedir}/karabiner/import.sh" 11 | mkdir -p "${HOME}/Library/Application Support/Karabiner" 12 | rm -f "${HOME}/Library/Application Support/Karabiner/private.xml" 13 | ln -f -s -v "${basedir}/karabiner/private.xml" "${HOME}/Library/Application Support/Karabiner/private.xml" 14 | fi 15 | -------------------------------------------------------------------------------- /rbenv/default-gems: -------------------------------------------------------------------------------- 1 | bundler 2 | pry 3 | pry-doc 4 | -------------------------------------------------------------------------------- /setup.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | goto :main 4 | 5 | :link 6 | del %1 2>nul 7 | mklink %1 %2 8 | goto :EOF 9 | 10 | :dlink 11 | rmdir %1 2>nul 12 | mklink /d %1 %2 13 | goto :EOF 14 | 15 | :main 16 | setlocal enabledelayedexpansion 17 | 18 | set HOME=%HOMEDRIVE%%HOMEPATH% 19 | set CONFIG=%~dp0 20 | set DOTFILES=%CONFIG%dotfiles 21 | 22 | for /D %%D in (%DOTFILES%\dot.config\*) do ( 23 | set CONFIG_DIR=%LOCALAPPDATA%\%%~nD 24 | if not exist !CONFIG_DIR! ( 25 | mkdir !CONFIG_DIR! 26 | pushd !CONFIG_DIR! 27 | call :dlink Config %%D 28 | popd 29 | ) 30 | ) 31 | 32 | pushd %HOME% 33 | 34 | call :dlink .config %DOTFILES%\dot.config 35 | 36 | call :link _nya %CONFIG%\windows\ckw\_nya 37 | 38 | call :link .hgrc %DOTFILES%\dot.hgrc 39 | call :link .hgignore %DOTFILES%\dot.hgignore 40 | call :link .inputrc %DOTFILES%\dot.inputrc 41 | call :link .irbrc %DOTFILES%\dot.irbrc 42 | call :dlink .vim %DOTFILES%\dot.vim 43 | call :dlink vimfiles %DOTFILES%\dot.vim 44 | call :link .zshrc %DOTFILES%\dot.zshrc 45 | call :dlink .zsh %DOTFILES%\dot.zsh 46 | 47 | popd 48 | 49 | endlocal 50 | 51 | pause 52 | -------------------------------------------------------------------------------- /setup.d/05dotconfig.sh: -------------------------------------------------------------------------------- 1 | set -eu 2 | 3 | link() { 4 | local src=$1 5 | local dest=$2 6 | if [[ -a "${src}" ]]; then 7 | [[ -L "${dest}" ]] && rm -f "${dest}" 8 | [[ ! -a "${dest}" ]] && ln -f -s -v "${src}" "${dest}" 9 | fi 10 | } 11 | 12 | mk_links() { 13 | local config_dir=$1 14 | 15 | mkdir -p "${config_dir}" 16 | for path in "${CONFIG_BASE}"/dotfiles/dot.config/* 17 | do 18 | filename="$(basename "${path}")" 19 | link "${path}" "${config_dir}/${filename}" 20 | done 21 | } 22 | 23 | if [[ -d "${CONFIG_BASE}"/dotfiles/dot.config ]]; then 24 | case "${OS}" in 25 | Mac) 26 | mk_links "${HOME}"/Library/Preferences 27 | mk_links "${HOME}"/.config 28 | ;; 29 | Linux) 30 | mk_links "${HOME}"/.config 31 | ;; 32 | esac 33 | fi 34 | -------------------------------------------------------------------------------- /setup.d/10link.sh: -------------------------------------------------------------------------------- 1 | link() { 2 | local src=$1 3 | local dest=$2 4 | if [[ -a "${src}" ]]; then 5 | [[ -L "${dest}" ]] && rm -f "${dest}" 6 | [[ ! -a "${dest}" ]] && ln -f -s -v "${src}" "${dest}" 7 | fi 8 | } 9 | 10 | pushd "${HOME}" 11 | 12 | relative_base=${CONFIG_BASE#${HOME}/} 13 | 14 | for path in "${relative_base}"/dotfiles/dot.* 15 | do 16 | filename="$(basename "${path}")" 17 | link "${path}" ~/"${filename#dot}" 18 | done 19 | 20 | mkdir -p ~/share 21 | link "${relative_base}/bin" ~/share/bin 22 | 23 | popd 24 | -------------------------------------------------------------------------------- /setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -eu 4 | 5 | if [[ "$(uname)" == "Darwin" ]]; then 6 | export OS="Mac" 7 | else 8 | export OS="Linux" 9 | fi 10 | 11 | export CONFIG_BASE="$(realpath "$(dirname "$0")")" 12 | 13 | for f in "${CONFIG_BASE}"/setup.d/*.sh; do 14 | [[ -r "${f}" ]] && bash "${f}" 15 | done 16 | [[ "${OS}" == "Mac" ]] && "${CONFIG_BASE}/mac/setup.sh" 17 | --------------------------------------------------------------------------------