« first day (20 days earlier)      last day (3652 days later) » 

 
9 hours later…
11:01
0
Q: Should Vi.SE be self-contained (as much as that is possible)?

glanceThis is probably something a lot of you have already thought about, but it doesn't seem to have been addressed here on meta (or I didn't manage to find the post). A lot of topics, problems and solutions about vi/vim already exist scattered around the various sites of the stackexchange network, m...

 
1 hour later…
12:06
:set revins
Makes inserting characters work backwards ... This would make a great prank to do with an open Vim session of a co-worker
 
5 hours later…
16:41
@Carpetsmoker It's a great feature, it lets people who prefer top-down design get along with folks who like bottom-up design.
@Carpetsmoker Sounds like a question for the site, if you haven't already asked it.
... which I guess you did.
16:59
It's weird that this works for you—it shouldn't. STOP/CONT should just pause and resume the process, nothing more. It doesn't work here, in either console vim or gvim. — derobert 12 mins ago
@derobert SIGSTOP "detaches" it from Vim
And doesn't seem to get re-attached on SIGCONT
I actually get the same if I just do it in my shell
@Carpetsmoker It shouldn't. It should just stop scheduling it. Not change its parent.
It doesn't change its parent
I tried it with sleep (not gitk), but it didn't work with sleep here.
jobs still lists it
Sorry, that wasn't clear—shouldn't change its parent's behavior
17:02
When I send SIGSTOP I get:
sh-4.3$ mupdf jaarrekening2014en.pdf

[1]+ Stopped(SIGSTOP) mupdf jaarrekening2014en.pdf
sh-4.3$
And mupdf doesn't do anything anymore (as expected)
When I send CONT, mupdf responds again, and my shell is also usable
sh-4.3$ jobs
[1]+ Running mupdf jaarrekening2014en.pdf &
Don't know why it doesn't work for you ... I tried this in tcsh, bash (shown), and zsh
I tried it in vim—I thought that was a question about running it on the vim prompt
Yes, it behaves the same in Vim
Odd. It doesn't here in vim. Though my bash behaves the same as yours.
:! is really just running the shell
32745 pts/61   Ss     0:00  |   \_ bash
  712 pts/61   Sl+    0:00  |       \_ vim
  722 pts/61   S+     0:00  |           \_ sleep 60
... so there isn't a shell in there.
17:05
hmm
Wait, if I use: set shell=/bin/sh before I do this, it doesn't work .... But it does work in my (default) tcsh
Interesting. I wonder if my vim is actually executing the shell, strace will find out!
I'm pretty sure :! runs a shell, at least on my system, as I often use shell aliases ...
:!alias dejson
python -mjson.tool
anthony@Zia:~$ strace -e 'execve' -f -p 974
Process 974 attached with 2 threads
Process 1100 attached
Process 1101 attached
[pid  1100] execve("/bin/bash", ["/bin/bash", "-c", "sleep 2"], [/* 55 vars */] <unfinished ...>
[pid  1101] +++ exited with 0 +++
[pid  1100] <... execve resumed> )      = 0
[pid  1100] execve("/bin/sleep", ["sleep", "2"], [/* 55 vars */]) = 0
[pid  1100] +++ exited with 0 +++
[pid   974] --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=1100, si_uid=1000, si_status=0, si_utime=0, si_stime=0} ---
OK, so yeah, it's going through the shell. And apparently bash just realized that it could optimize by using exec instead of fork/exec
... and I bet that's why I get different behavior. Bash wasn't around anymore to notice that its child had been stopped.
So it seems to work for tcsh and fish ... But not for bash, zsh, mksh, and dash ...
Ah, well, now we have an explanation.
17:10
0
Q: Suggesting new users should read the :help

Rich@romainl has written a great summary of how to use Vim's documentation. I think this should be copied into, or at the very least linked from, the site's official help pages. It should also, if possible, be waved fairly obtrusively in front of users before they ask their first question on the si...

I'm also getting rather annoyed by a certain user who keeps adding a boatload of noise to the site ...
user4704
Why?
Because it's noise?
user4704
Why get annoyed though? Why not fix it?
I tried
user4704
17:13
(what is it you consider noise?)
It gets "fixed" back ... So well ...
user4704
Ah, that sort of thing? That's kind of a pain, but users need to understand that they do not own the content they put on the site and if they are not comfortable with others editing it constructively they should go elsewhere.
user4704
What specific content are you talking about?
7
Q: How can I open multiple tabs at once?

CarpetsmokerIf I use: :tabedit file1 file2 I get: E172: Only one file name allowed Is there any way to use :tabedit with multiple file names? Or another way to open multiple tabs at once?

Things like that ...
(comments on question, as well as the "answer" provided by said user)
Maybe my standards are just too high ... I don't know ... But I would really like to prevent this site becoming the mess of silly answers that SO sometimes is...
user4704
That's largely inevitable. However:
user4704
17:19
Commenting with links to related questions on SO is fine, as long as it's a comment not an answer. It would be better to not do this during the site's beta, since we'd rather have better answers here, but it's not the end of the world.
user4704
It's probably not a good idea to engage in the discussion though, especially if you're concerned about noise-ing up the question.
user4704
But an answer that doesn't do anything but restate information already in another answer is usually worthless and totally worth downvoting (in my opinion).
Well, it's a useless comment ... normally I would have let it go, but this is the nth useless comment/answer which just repeats what has already been said by said person, so I perhaps got slightly carried away ...
user4704
It's not that useless though. It provides pertinent information to the asker that isn't really made obvious by the system itself.
It does function as a quick way to point the asker to somewhere else on the network where the answer can be found—though really the person leaving the comment should be clear that the question is still welcome here (and since we're the vi site, should get a better/more detailed answer). But a quick comment answer is nice too, because sometimes you just need to get the #@(# task done.
user4704
17:25
This user in particular seems to participate in too many overly-verbose comment discussions; comments are not for extended discussion. But until somebody gets the ability to trigger the migration-to-chat for such comments, it's best to simply avoid engagement in the discussion.
user4704
Vote down the answer, move on. You're not under any obligation to comment and provide a reason why (it's nice, obviously, but I frequently do not comment if the reason I'm downvoting is succinctly described as "this answer is unredeemable")
I engaged him once :-) (well, twice, once also on Area51, just as it happens), and will avoid engaging unless absolutely required in the future.
(it wasn't my intention to start a discussion about this, btw, I was just annoyed that he seems somewhat impervious about even the most obviously wrong things, and added a bunch of answers days or even weeks later which just restate other answers ... :-/
user4704
I know. But if you get a diamond you're going to have to face this sort of scenario often, and you have to be able to resist the urge to just obliterate the user from existence. Unfortunately.
That's a tl;dr right now, sorry :-( But yes, I know ... And I'm not suggesting obliterating anyone
user4704
17:33
Not yet.
user4704
But you will want to.
user4704
:D
user4704
It happens to everybody.
@Carpetsmoker BTW, ^Z sends SIGTSTP not SIGSTOP. Though that doesn't work with bash either, at least here.
17:42
Yeah, I tried SIGTSTP too, that only works in tcsh and fish as well
Your new answer says ^Z sends SIGSTOP. By default both stop a process. The main difference is that a process can change the behavior of SIGTSTP, but it can't change SIGSTOP.
Perhaps it's a bourne-shell specific semantic, as the only 2 shells that don't do this, are not bourne shells
Ah
Thanks :-)
(SIGSTOP is handled entirely in the kernel, like SIGKILL)
17:55
So if SIGSTOP can't be caught by the application, how is it that different applications behave different then, hmm ...
@Carpetsmoker You're sending it to the sleep, which can't catch it. But the bash or tcsh which is its parent can behave differently (and apparently do).
SIGTSTP can be caught, that's how some programs do various things (up to completely ignoring it) when you press ^Z
Yeah, but SIGSTOP also doesn't work :-)
I suspect it's due to your earlier comment:
OK, so yeah, it's going through the shell. And apparently bash just realized that it could optimize by using exec instead of fork/exec
... and I bet that's why I get different behavior. Bash wasn't around anymore to notice that its child had been stopped.
When starting from tcsh, I do get:

     `- vim
       `- tcsh
         `- mupdf
ack, how does one do code blocks?
@Carpetsmoker Four spaces, like normal. Though on chat, it's either then entire message or none at all
@Carpetsmoker Turns out that isn't it—do :!sleep 60 | cat and the bash sticks around, but still doesn't work.
18:03
oh
21087 ?        S      0:00  \_ /usr/bin/xterm
21089 pts/38   Ss     0:00  |   \_ bash
21099 pts/38   Sl+    0:00  |       \_ vim
21108 pts/38   S+     0:00  |           \_ /bin/bash -c sleep 60 | cat
21110 pts/38   S+     0:00  |               \_ sleep 60
21111 pts/38   S+     0:00  |               \_ cat
I did a grep of SIGSTOP on dash and tcsh sources, and neither does anything with it; which is impossible acording to `signal(7)` (as you said):

The signals SIGKILL and SIGSTOP cannot be caught, blocked, or ignored.
Correct. But they're not receiving the signal, their children are.
kill -STOP 21110 sends it to the sleep, not to the bash that's running it.
Right, yes, you said that
There should be a wait-variant handling it.
Possibly via WUNTRACED
Or WSTOPPED, etc. Depends on the wait variant.
man 2 wait will probably give details for your system...
 
3 hours later…
20:47
Public service announcement: remember to activate keyboard shortcuts for the site in your user preferences.
72
Q: Announcement: Keyboard shortcuts are now integrated into the site

balphaOriginally we had implemented keyboard shortcuts as a user script. We have now finally made the change to have them integrated into the site. When you go to the "preferences" page on your profile, you'll find a new checkbox labeled "Enable keyboard shortcuts". Click it, and from there on, everyt...

21:37
0
Q: what is on topic here that cannot be asked on SO?

eckesSee title. I don't get it what's the point ofthis site. What couldI askhere that I cannot askon stackoverflow.com where there's alreadya huge Vimknowledge present?


« first day (20 days earlier)      last day (3652 days later) »