kde kate - how to configure kate to display the link to a file - kate

When I open a link to a file, kde kate displays the name of the destination file. I would like it display the name of the link, as gvim does btw.

Related

Can’t open a file whose directory’s name starting with #

I am using gvim on Windows10.
I use gvim as a default text editor on my PC.
When I double click and open a .txt file which is in a directory starting with “#”
For example:
C:first/second/#third/text.txt
Then gvim opens up and throws E344.
It seems accessing a wrong directory:
C:first/second#third/text.txt
How can I avoid this error without changing the name of the directory?

How to use "open_files_in_new_window" on Windows in Sublime Text 3

This question has been asked before but they are all for Mac OS.
Is there a way to get:
"open_files_in_new_window": false,
to work in the Windows version of Sublime Text 3?
Looks like "open_files_in_new_window" does not work in Windows.
But this works for me:
Press Windows button and search for Sublime
Right click on 'Sublime Text' and open file location
Right click and open Properties of the Shortcut
Add -a at the end of Target field like this "C:\Program Files\Sublime Text 3\sublime_text.exe" -a
-a or --add: Add folders to the current window (https://www.sublimetext.com/docs/command_line.html)

how to make cygwin build program in windows use windows path

I built and installed a program with cygwin in windows, but the program can not find windows style paths and must use /cygdrive
I just want to know how to spare this burden
The problem is this:
C:\Documents and Settings\Administrator>protoc -If:
f: warning: directory does not exist.
Missing input file.
C:\Documents and Settings\Administrator>protoc -I/cygdrive/f
Missing input file.
This is the common problem with windows stuff, it always uses spaces in paths. Two solutions:
1st. Open your cygwin (black one) terminal and type (I suppose you will be in your home directory):
cp /etc/dev/etc/skel/.bash* .
this will copy all the bash files you need to your current directory to "handle" your cygwin system. To know where you are in your cygwin (ie. the path to your current directory) type "pwd" (without the quotes) and press Enter (or Return for some people).
2nd. Open the .bashrc file already copied and type (I use "vi" editor for this but you can use "pico" which is a bit easier):
alias C="C:\Documents\ and\ Settings\Administrator"
save the .bashrc ("Ctrl+X" in pico I think, and :wq in "vi") and close the terminal. After restarting this console, typing "C" and pressing enter will send you automatically to "C:\Documents and Settings\Administrator"
To know which alias you have, just type "alias" in your terminal and all your alias will show up.
HTH,

how to make a file editable in linux without becoming root

i am working with files placed in directory /etc/asterisk using vim editor, every time i have to do some editing i have to go to terminal to become root and opens file in vim editor and performs edition,but if i do it by directly opening the file from such directory(/etc/asterisk) in gedit and perform edition in the file but it doesn't show the save option if save as option is selected message becomes "you need to become root for such operation." is there any way to open these files(placed in /etc/asterisk) directly from gedit and save the changes without going into terminal
You can always do sudo gedit from the terminal to launch gedit as root to edit the files.

How do I use my .vimrc file in Cygwin?

I just installed Cygwin on my work machine and would like to use the .vimrc file I use on my Linux box at home.
Is that possible, or does it need to have Cygwin-specific settings?
Where would I put the .vimrc file?
I'm a little unsure of what directory I'm being dropped into at the bash prompt under Cygwin, but I think I'd create a subdirectory called .vim there, right?
I launched vi as vi -V and got this:
chdir(/cygdrive/c/Users/johntron)
chdir(/etc)
chdir(/cygdrive/c/Users/johntron)
could not source "/etc/virc"
chdir(/cygdrive/c/Users/johntron)
chdir(/cygdrive/c/Users/johntron)
chdir(/cygdrive/c/Users/johntron)
could not source "$HOME/.virc"
chdir(/cygdrive/c/Users/johntron)
chdir(/cygdrive/c/Users/johntron)
chdir(/cygdrive/c/Users/johntron)
could not source "$HOME/.exrc"
Realizing vi was looking for .virc and not .vimrc like all the other *nix systems I've ever used, I just ran this to fix the problem:
cp ~/.vimrc ~/.virc
... or if if you've configured symlinks:
ln -s ~/.vimrc ~/.virc
I'm pretty sure this was a problem, because Cygwin installs vi, and not vi improved; however, the loading screen if you launch vi with no parameters still says vi improved. Regardless, I installed vim via setup.exe and running vim (not vi) does indeed try to load ~/.vimrc as expected. You can simply add an alias vi=vim to your ~/.profile to use the improved version by default.
Cygwin (as of version 1.7.25) installs vi (not vim!) by default. If you also install vim you will have two commands: /usr/bin/vi and /usr/bin/vim.
Unlike in other *nix (e.g. debian) both commands slightly differ in their behaviour on starting vi/vim.
Both commands will load Vi Enhanced but they differ in the files they look for to initialize the editor:
/usr/bin/vi looks first for /etc/virc and then for $HOME/.virc
/usr/bin/vim looks first for /etc/vimrc and then for $HOME/.vimrc.
Both files (in /etc and in $HOME) will be sourced if found!
You can check it yourself entering vi -V and vim -V.
Use .vimrc if you call vim and .virc if you call vi. Or simply alias vi=vim for using .vimrc
1) Yes it is possible. It doesnt need any cygwin specific settings, though you can add some windows specific ones. Just make sure to install vi (vim gvim equivalent) properly.
2) the same place as on *nix -- user home directory
Beware one thing: there is a Cygwin port of vim, and a native win32 port of vim. Both have their advantages and their flaws when dialogue with cygwin or native-win32 applications is concerned.
A category on vim.wikia is dedicated to cygwin related tips.
Some parts of file system of Cygwin use your "host" file system as its own. Within cygwin, there is a user home directory (which actually resides under your "Documents and Settings/Username" folder), so you should place it there.
Just place your .vimrc somewhere you know how to access via cygwin and do a
directory/you/know$ cp .vimrc ~/
It will work--at least worked with default vim on my Cygwin installation several months ago.
I don't see any reason why your Linux ~/.vimrc
should not work in your cygwin install.
To go to your home directory in cygwin,
cd ~
or
cd $HOME
In Windows, you can use WinSCP to connect to your Linux box, open your Linux .vimrc in the WinSCP default editor, copy the contents. Then switch to the Cgywin terminal and type
getclip > ~/.vimrc
Start vi/vim to see if your new settings have taken effect:
vi
I had to rename / symlink my .vimrc file to .virc in a directory like /home/Leo/.virc or more generally $HOME/.virc.
I just created my own and worked out of box:
1) vim ~/.vimrc
Once inside the .vimrc (blank file) I like to copy the example from:
2) :r $VIMRUNTIME/vimrc_example.vim
3) :wq
Then check any file should have lots of color and stuff
4) vim .vimrc (or whatever file, e.g. ~/.bashrc)
simply navigate to your home directory which is
c:/Users/user_name/
create the file using
vi .vimrc
set your preferences here, and they would surely reflect
like
set nu "show line numbers
set ai "auto indentations
colors blue " or elflord or whatever you like.
save and try.
I had issue with Cygwin vi tabstop. It was always defaulting to 8. While launching it was giving error "Failed to source defaults.vim" Tried to follow various solutions but below worked for me.
Create .vim directory under current user home ($HOME) directory.
Create .virc file under .vim directory.
Add below line to .virc
set tabstop=4
Cygwin version details
CYGWIN_NT-10.0-22000 3.3.5-341.x86_64 x86_64 Cygwin

Resources