sunaku

sunaku

23p

18 comments posted · 7 followers · following 0

297 weeks ago @ The Terminal Programmer - Copying to clipboard f... · 0 replies · +1 points

Good find! Yes, the tmux keybindings always needed to explicitly redirect the OSC 52 escape sequence generated by the yank(1) script to the terminal device in order to work properly. This was never necessary for the Vim mapping in my experience, but you have now demonstrated otherwise! :-)

I have updated the Vim mapping presented in this article accordingly. Thanks for your feedback.

297 weeks ago @ The Terminal Programmer - Copying to clipboard f... · 4 replies · +1 points

Try this:

Yank some text normally in Vim.
Run :echo @0 and verify that the result is the same text you yanked in step #1.
Run :echo system('cat -n', @0) and verify that the result is the same text (but now decorated with line numbers) you yanked in step #1.
Run :call system('yank', @0) and check whether your terminal gets the message.

372 weeks ago @ The Terminal Programmer - Copying to clipboard f... · 0 replies · +1 points

Good question. We can use POSIX shell parameter expansion to redirect yank output to (1) $SSH_TTY when present or (2) tmux's #{pane_tty} otherwise:

yank > ${SSH_TTY:-#{pane_tty}}

I don't remember whether tmux automatically updates $SSH_TTY across distinct SSH sessions (i.e. you ssh into a remote machine, start tmux, disconnect ssh, then reconnect ssh, and finally reattach tmux). If such functionality isn't present, we're thrown back to the same problem as X11-forwarding: maintaining environment variables across disconnects.

By the way, don't you find it a bit unnerving to run tmux inside tmux? Because all keybindings go to the outer tmux, even when the inner one's pane is focused, unless you define disjoint keybindings for each tmux or you escape them so that the outer tmux sends them untouched to the inner one.

Finally, the "nested" scenarios I imagined when writing this article were where there is a single tmux amdist zero or more nested ssh connections, like this: your terminal ⇒ ssh (zero or more) ⇒ tmux ⇒ ssh (zero or more) ⇒ yank.

I hope that helps. :)

410 weeks ago @ The Terminal Programmer - Vim script management ... · 1 reply · +1 points

Hey, thanks for reporting this bug! I was able to reproduce it in all Vim 7.x versions running under Windows 7, but it did not occur at all under Linux. Nevertheless, I solved it:

" ignore *.get files in Windows' globpath()
" see http://goo.gl/g1EcnJ for more details
set wildignore =*.get/.

Simply add the above snippet at the top of your vimrc file (before Unbundle.vim is loaded) and you shouldn't see those pesky *.get files in your Vim runtimepath anymore. :-)

412 weeks ago @ The Terminal Programmer - Vim script management ... · 0 replies · +1 points

Hey, I'm glad you liked the horizontal scrolling design. :-) It's done using a jQuery plugin that I wrote called "horizoll". I'll write up an article about it when I get some free time again. In the mean time, feel free to try out the plugin. Cheers!

412 weeks ago @ The Terminal Programmer - Switching from Fish to... · 1 reply · +1 points

Good question. Something similar was already asked and discussed at great length in the past in a Reddit thread.

424 weeks ago @ The Terminal Programmer - Putting Sencha Archite... · 0 replies · +1 points

I put them in my Rails app's public/ folder (at public/ext-4.2.0.663/ currently) and reference them in my app/views/layouts/application.html.erb file:

This is an alternative approach. The usual thing would be to include the ExtJS libraries in my application.{js,css} assets, but I don't do that because the assets compiler takes too long (and too much memory) to process them during deployment.

424 weeks ago @ The Terminal Programmer - Putting Sencha Archite... · 0 replies · +1 points

You don't need to do anything special. In production, the source will automatically look like this:

<head>
<title>ExtjsBlog20130806</title>
<link href="/assets/application-cb31da1beffab7d8f4a1a4a9d7e64e7d.css" media="screen" rel="stylesheet" type="text/css" />
<script src="/assets/application-29bb5ff32c21a0f882a67c20d96ff9a8.js" type="text/javascript"></script>
<meta content="authenticity_token" name="csrf-param" />
<meta content="LwmaMngm3rMIm9QOa3hM+VdxmUt4XoE/q/EDxsAvbDk=" name="csrf-token" />
</head>
<body>

<h1>Listing users</h1>

<table>

Cheers.

425 weeks ago @ The Terminal Programmer - Putting Sencha Archite... · 2 replies · +1 points

For Windows (which does not support symbolic links) you can:

1. Move the gui/ directory from the root of your Rails project into the app/assets/javascripts/ directory.

2. Delete the following lines from your app/assets/javascripts/gui.rake script:

directory project = '../../../gui'
file 'gui' => project do |t|
ln_s t.prerequisites.first, t.name
end

Let me know if that works for you. Cheers!

446 weeks ago @ The Terminal Programmer - Fixing 256-color Backg... · 0 replies · +3 points

This isn't a hack. If you read the conclusion, you'll see that this article is about overriding Vim's t_ut terminal setting and not the TERM environment variable.
http://www.reddit.com/r/vim/comments/1a29vk/fixin...