I set git-bash for windows as default terminal in Intellij IDEA. It works but I am unable to write tilde (~) character there (Shift+~). Tried changing different options in settings but without any luck.
versions:
Windows 10
Intellij IDEA 2017.2.5
git version 2.14.2.windows.3
path to shell: "C:\Program Files (x86)\Git\bin\sh.exe" --login -i
Does anyone had similar problem and know the solution?
It is really annoying when I have to copy this character or work in seperate terminal in situation where direct view on code is preferable.
Not really a solution, but probably a more convenient workaround: you can use ALT + 126 to print tilde character.
(while keep press Alt, on your keyboard type the number 126).
I have the same issue.
I accidentally clicked on 'F6' today and this added ~ in my console.
It isn't resolve, but I guess that easier workaround.
I solved this issue by enabling the keyboard type called eliminate dead keys. In my case it is Swedish and the keyboard type on Linux Elementary OS I'm using is called Swedish (eliminate dead keys).
It is available in other languages as well including Norwegian and German.
The disadvantage is that you cannot combine these to make characters anymore.
I don't know the solution nor given in other answers work for me, so I will just share workaround I use. It's ugly, but better than copying tilde from other Window.
In ~/.bashrc file I added alias T='echo ~' (and invoked source ~/.bashrc after, to apply changes) so now everytime I need tilde I use $(T), for example ls $(T).
As other said upvoting this problem in youtrack may bring solution sooner or later - https://youtrack.jetbrains.com/issue/IDEA-152703
Related
Kotlin Repl does not open ,nothing happens on clicking it
My solution/workaround. What happens is, and by the way the Intellij ide warns you about this, that you create the project and when naming it you use a space or similar unsupported character and the ide still seems to create the project just fine but actually it doesn't. Your project comes out misconfigured and you can't use Kotlin Repl. The simplest solution is to replace any spaces (or similar forbidden characters) with a hyphen "-" or an underscore "_" or simply use cammelCase. Best of luck to everybody and hope future learners of kotlin see this and spend less time troubleshooting such a simple issue.
Do you have a project open when you click it? This post states: "At this time the Kotlin REPL requires you to have a project open. You don't need to configure anything specific in the project; a Java project with the default settings will run just fine.
If you want to try Kotlin without configuring anything, you can use the online IDE at http://try.kotlinlang.org/"
I would like to use IntelliJ's feature, which converts Java code to Kotlin by simply copy-pasting from Java file to Kotlin file. It is working fine, but when I turn on IdeaVim plugin, it refuses to work anymore. I know Vim decently and I that's not the problem with my misunderstanding Vim edit modes. I am aware of How can I convert a part of Java source file to Kotlin? and answer by #yole saying that there is no other tool to do that.
But that answer was made over 3 months ago, and maybe some other tool appeared. So, my question is if someone found workaround to make IdeaVim plugin cooperate with Java to Kotlin conversion. I've already made a ticket on YouTrack: https://youtrack.jetbrains.com/issue/VIM-1103 but frankly, I am not so sure if it will be resolved.
Ok, guy from JetBrains answered my issue. The obvious workaround (which I didn't figure out) is to copy and paste from context menu. Then conversion question shows up. IMO it seems unlikely that IdeaVim plugin will support this feature by yanking and putting (Vim's copying and pasting), as from:
Running IDE actions on copy and paste might be a good idea, but we're not sure it wouldn't disrupt the workflow of the current users.
The vim plugin takes over the clipboard and past functions. When you type :actionlist you get a list of idea actions you can use in your .ideavimrc file to map keymaps to idea actions. Use :action COMMAND to execute the command.
I.e.:
norepmap <C-w>q :action VimWindowClose<cr>
closes the current window.
Furthermore, you can search for a particular action with :actionlist Past.
This lists
EditorPast <C-V> <S-ins>
among other things.
If you want to check if EditorPast ist the right command you can test it using :action EditorPaste.
Another way to make this work is to let idea handle the <C-v> shortcut. This can be archieved with the Settings -> Other Setting -> Vim Emulation settings. The handler (vim or idea) can be defined with that setting.
After I do a git rebase, the code lines I have added/modified are indented four spaces or more to the left of the respective code block. This is incredibly annoying and time-consuming to fix, not to mention it makes it unreadable for Objective-C (imagine if I was coding in python...?)
Xcode (or whatever, git?) adds in tabs in place of the spaces, and my Xcode is set to make tabs spaces.
No one at my work seems to have a good answer for why it occurs. I made trustctime false, but that did not help. Any help?
This could be a whitespace setting. Check out the options for core.whitespace on the git-config man page. If you have that set as well as apply.whitespace, then git will do things to your whitespace, probably including during a rebase.
Try finding out what git config core.whitespace and git config apply.whitespace are and modify them in your ~/.gitconfig file or with something like:
git config --global apply.whitespace nowarn
UPDATE
I think this may be a duplicate of git whitespace woes
END UPDATE
Unless you've done some customization into your git post-commit hooks or to your git config core.whitespace settings (thanks for pointing that out jesse), git does not translate spaces to tabs or vice versa or anything like that. The changes are usually results of your environment/files and your merge activities.
Having dealt with this in various forms, my guess is that some of your peers are using tabs and some are using spaces. People will have flame wars all day long on whether you should use tabs or spaces, and depending on the day and language I hop sides. That's not something I will get into here.. However just about every rational participant in said war would agree that regardless of which you pick, you need to pick one and use it consistently throughout a project.
Most reasonable editors allow you to control whether tabs or spaces should be inserted, and I know XCode is no stranger to this.
I would suggest showing the whitespace or using briefly an editor which allows you to see the whitespace to see what the difference actually is. Seperately, after you correct a whole file you could also just use git diff -w -b to suppress white space changes. That said you should really figure out what the heck is causing your whitespace to go nuts on a rebase because that suggests to me most likely git is confused by mixed usages, and multiple people correcting it at multiple points with different resolutions.
Good luck to you, it's never easy, and someone is always unhappy when their cheese gets moved.
I don't know what about my git-config was the issue, but after clearing it out and re-doing my settings, the problem was fixed. I don't have my old git-config :( This occurred many months ago, but I thought I would express that this was not xcode related.
I handed in a C program which contained a lot of verbose printf debug lines. I always compiled it command line with gcc.
Now it's been turned into an Eclipse-CDT (Helios) project, and my
\n
no longer do carriage returns. I get an unreadable "staircase" in my console.
RCINAHFM. Is there a check box in the IDE I need to modify or do I need to go back and carefully modify hundreds of lines of code?
Any help greatly appreciated.
Bert
RCINAHFM=Remaining calm / I need a hug from Mom
Eclipse does not compile C all by itself. It uses an external compiler for that, usually gcc. So it’s highly unlikely that the compiled program is incorrect, unless the compiler configuration within Eclipse does something very, very weird.
If you get a “staircase”, it sounds as if the new line part is carried out, but no carriage return happens. This might happen under systems that use CR/LF as their line ending, such as DOS/Windows.
Unfortunately, you give way to little detail. Are you using Unix or Windows? Where does the program run, in an XTerm, a Windows DOS console, within the Eclipse console? If the answer is “Eclipse console”, then have you tried running it in another terminal instead; or tried running your original program in the Eclipse console? Are you using printf or some other function?
I wrote simple script test
echo hello #<-- inside test
if I press one time enter after hello, my script will run, if I don't press - it will not, if two times I'll receive my hello and + command was not found, can somebody please explain me this behavior thanks in advance
This is not a part of the code, this is actual code
and I run it on C-Shell, via editor of Windows
command:
source ./test
Some points:
You should not ask questions tagged with both the [csh] and [bash] tags - these are completely different programs and implement completely different script programming languages
You should never name a script (or any other program) test, as this is the name of a built-in feature of bash
Post the actual code you are asking about, without annotations and show how you run it.
I have tried a similar case. I wrote a script like yours, saved it using Windows Notepad (with CRLF line terminators) and run in bash with the same effect as yours in csh. The problem is bash (so csh as well) does not understand Windows' 2-byte line terminators, which are interpreted as commands, which obviously do not exist.
The solution is: change your editor or configure your current editor to use unix line terminators.
You can try for example Notepad++. Remember to change the line terminators to LF.