Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I'm opening a file on a remote drive - it takes 3-4 seconds to open it - that's ok.
But afterwards, a lot of commands become really slow.
I'm typing :help vimrc - it takes 3-4 seconds to display.
I'm typing :setlocal nobuflisted - it takes 3-4 seconds.
It probably has something to to with those commands accesing the filesystem. If I do :setlocal list it works ok.
Also if I switch to another buffer, everthing is back to normal again.
Is there something I can do to improve performance?
Maybe the swap file is created in the remote directory and slows down your performance.
Try setting the default directory for swap and backup files on your local drive with:
set directory=/home/john/tmp
set backupdir=/home/john/tmp
Check your 'statusline' setting and autocmds on events like CursorMoved[I] and BufWinEnter.
I once had a function in my status line that invoked expand('%:p:h'); it caused a noticeable slowness as experienced by you. I fixed this by caching the lookups in a script-local Dictionary.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
I'm running a script on terminal and it is supposed to produce a long output, but for some reason the terminal is just showing me the end of the result and I cannot scroll up to see the complete result. Is there a way to save all the terminal instructions and results until I type clear.
The script I'm using has a loop so I need to add the output of the loop if Ill be redirecting the output to a file.
Depending on your system, the size of the terminal buffer may be fixed and hence you may not be able to scroll far enough to see the full output.
A good alternative would be to output your program/script to a text file using:
user#terminal # ./nameofprogram > text_file.txt
Otherwise you will have to find a way to increase the number of lines. In some terminal applications you can go to edit>profiles>edit>scrolling tab and adjust your settings.
You can either redirect the output of your script in a file:
script > file
(Be careful to choose a file that does not exist otherwise the content will be erased)
Or you can buffer the output with less:
script | less
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I have a small script which is creating a backup every 2 hours. Now I would like to delete the old ones. I know "find" can do this, but I want it more advanced.
I want to keep
all backups form the last 24 hours
4 backups from the last 5 days
1 backup from the last 14 days
everything older than 14 days can be deleted
Could you tell me how to do this via. a shell bash script in debian ?
I couldn´t find anything for this via. google.
Thank You.
Do not reinvent the wheel. Take a look at rsnapshot. Unless you want to use this as a learning exercise, I see no reason why you would want to spend the time that has already been spent to solve this problem.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I am using the terminal program called screen, which can create several "virtual terminals" in a single "real" terminal (the words "virtual" and "real" here are quite relative, the "real" terminal can be a konsole tab as well, not necessarily tty1-tty6). The problem is that I cannot create more than 40 windows inside a single screen. When I try to create more, screen says "No more windows." After some googling I found that that this is controlled by something called MAXWIN, but I didn't find any information how to modify this MAXWIN. How can I increase the maximal number of windows inside a single screen?
I use Debian 6 "squeeze".
PS I understand that I can run several screen's in several "real" (in the above sense) terminals, but this makes it harder to use multiple display mode (screen -x).
That's a compile time option. Using strictly packages from upstream, it can't be done. If you wanted to compile screen yourself, you could accomplish this. Look in the config.h.in file. Near the top will be # define MAXWIN 40. Change that to your new limit.
(more info)
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I'm using putty to connect to a unix host where I want to generate a new gpg key.
After the Key generation started I get this message
Not enough random bytes available. Please do some other work to give
the OS a chance to collect more entropy! (Need 292 more bytes)
This isn't the real problem.
The real problem is now I cannot issue any more commands to the shell, it looks like this
dfjd
q
s
w
e
r
t
z
z
u
^_
^[[A^[[A
Why is this the case, no command gets executed anymore and why does the arrow up key show up as ^[[A?
How can I fix this and issue some commands that the key can get generated?
Your client system is likely waiting for randomness before it completes its connection to the remote server, hence your commands are being ignored until it can complete the connection.
Have you tried doing what the message says? Try opening up a big folder and looking at its size (on windows) or doing a du / (unix) to generate some disk-based randomness. Some typing may also help, depending on how your system is gathering randomness.
Knowing your client would help.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I often need to move file from one location to other, but it requires copying and pasting huge part of the command. For example:
mv ~/Projects/foo/bar/baz.img ~/Projects/foo/bar/fiz.dmg
Is it possible after entering ~/Projects/foo/bar/baz.iso part of above command to use some shortcut that duplicates it so I can change the very end to fiz.dmg?
You don’t need this:
mv ~/Projects/foo/bar/baz.img ~/Projects/foo/bar/fiz.dmg
easily turns into
mv ~/Projects/foo/bar/{baz,fiz}.img
. Note: zsh completion is still available when you write { (unless you have a habit of writing closing } right away) if you want it.
I actually discovered one possible solution. Just press:
Ctrl+W few times and then Ctrl+Y two times (and space between pastes).