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.
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/"
When I develop with intellij (in java fyi), if I update for instance the return type of a method, I'm expecting intellij to mark all the files that are now not compiling without me doing a right-click compile.
I'm looking for such an option but I don't know where this is.
Thanks
There is no such option 'out of the box'. IntelliJ just works different than, for example, Eclipse when it comes to compiling. Eclipse recompiles all files that are affected by a change as soon as you save your changes. In IntelliJ there are two ways of checking the effect of your changes:
Trigger the compilation explicitly with Make Project or the compile action CTRL-SHIFT-F9.
Open one of the affected classes: only then will IDEA's Inspections mechanism start checking it for errors.
The advantage is that you have less file system load while you are coding.
But as described in this answer, there is a plugin to achieve what you want (even though it seems to have some performance pitfalls): https://stackoverflow.com/a/12744431/5788215
There is the simple interpretive programming language and, actually, console interpreter.exe.
Need to make colorizing of syntax, autocomplete and executing by press F5.
(if it is possible to make 'debug' - that will be awesome!)
I never did such things.
There are many IDE, which allow to add lang.: eclipse, NetBeans, emacs, ...
But I did not found complete instruction to add or they are ununderstandable.
What IDE is best to use? to add lang. as easy as possible?
(it will be cool, if IDE can work in Windows)
How to add my language there?
Please, if it is possible to give complete instruction.
Depending on how far you really want to go there are multiple options:
Dumb Autocompletion for text editors:
There are editors like scite aka Notepad++, that take a simple textfile with all the keywords to give you autocompletion, but they don't take into account the syntax nor the context. All they do is to highlight the words they know (e.g. you have given to them) and to autocomplete just these terms.
Smarter Syntax Highlighting:
This would require you to get used to the tools lex and yacc, if we are talking open source. I don't know which proprietary source tools are out there. If you want to get into that, there are several good pages on that topic, and this is one of them.
Compile it all the time:
A simple but effective method for small projects would be just to compile it once every few seconds, and interpret the output. This would be the messy version, but might be fun to look into.
The documentation for adding a new editor to Eclipse looks fairly straightforward:
http://wiki.eclipse.org/FAQ_How_do_I_write_an_editor_for_my_own_language%3F
This covers syntax color highlighting and autocomplete. I imagine you can also create a launch profile in the same plugin
I'm looking for some powerful programming environment for C/C++. In fact the only think i need is powerful source navigating + creating tool. Doesn't matter if its free or commercial. I prefer some linux tool, but it doesn't have to be necessary linux app.
What i need is some kind of editor with following capabilities:
more open files + tabs/buffers switching
highlighting (+ bracket matching, folding, etc...)
save sessions
preview window(when the cursors stops on some symbol, i have also an preview window, that shows me the definition of that symbol)
searching for uses of the symbol through code
intelligent completion (must support c++ 14!)
What would be nice:
code beautifizier or something similar
utf-8 support
editor templates(for example automatic comment header for modules, functions...)
other editor scripting
a terminal/console accessible from program || compiling debugging capabilities(just for to be able to compile the whole project without switching extensively to command line)
program flow visualization
Please do anyone around the whole world knows anything, that knows all of that?
I've tried several editors/IDEs, but all of them misses something. I've decided to emphasise missing support for new c++14 - it's now probably the biggest problem:
VIM
Amazing scripting capabilities
4 and 6: i've tried to use vim+ctags+cscope and vim+gtags + omnicomplete. But its not that usable. This doesn't work properly. Vim doesn't know c++ and it does not know the symbol context. Though i've been able to achieve basically the desired behaviour after hours of learning vim scripting, i'm not able to use it in even a little more complicated manner.(Lets say i have global variable and local variable with same names and different types - vim ofc does not recognize if im seeing now global or local only variable. And i'm not even talking about namespaces, etc....). Actually VIM now support c++14 with the help of clang(libclang) and there is awesome plugin called YouCompleteMe, that can use libclang, and its auto-complete really workds with c++14 code! And it makes the vim the only editor supporting c++14.. This plugin is now more or less usable in more editors(vim, emacs, sublime). It adds autocomplete, jump to definition and error messages.
c++14 supported
Source Insight
Amazing highlighting capabilities(different font for highlighting is amazing(especially for function names in function defintion header for example), also there is possibility to assign keyboard shortcut to cancel font differences, and leave only color highlighting(when you are bothered with different code alignment(due to different fonts)
Problems with 1) (though a hacked library for this called TabsSiPlus exists)
no terminal/console
Software is not maintained anymore, its not open source(and even not free) :(((
c++14 support missing
SlickEdit
Amazing customizing possibilities, can emulate vim editing style(WOW!)
no terminal/console(actually there is one, but not that good, however it has builtin compiling capabilities
it has strange GUI - a lot of space is occupied by scrollbars, different window captions, etc..
its kinda expensive(comparing to others)
c++14 support missing
Kdevelop4
Very pleasant GUI, nice console, very fast, can emulate vi editing style(not too well though)
miss force rescan/retag project (sometimes there are wrong symbol references, especially in bigger projects - this bugs me a lot)
its preview window doesn't show definition, only reference to definition, the definition then is showed in main editing window.. - cannot see actual code and the symbol definition at once :((
c++14 support missing
Eclipse
nice environment with lots of functionality.
don't have ad4), however it has some sort of preview bubble. When you hover mouse cursor upon symbol, it will show a bubble with symbol definition. Its nice functionality, but unfortunately you need to use mouse, and its noway that user friendly as separate preview window.
also its a little slow, but i think its due to realtime syntax checking, and it probably will be disablable.
c++14 support missing
Emacs
Support c++14 by similar plugins as vim(YouCompleteMe)(see in Vim section).
Please can some proficient Emacs user fill in this section?
c++14 supported
Sublime Text 3
Not free
Support c++14 by similar plugins as vim(YouCompleteMe)(see in Vim section). Though i had some problems with it. Plugin was more unstable than in Vim for me.
Through different plugins it support more or less the same functionality(from user view) as vim.
c++14 supported
Do any of you use some different editor, that can do anything from the list above, or maybe some plugins/scripts that can achieve the demanded functionality?
Regarding VIm and your point 6, I have heard that clang_complete, which is leveraging clang from LLVM compiler was quite accurate but I have not yet tested myself.
Try Eclipse, can handle almost everything (from Java to C with GNU Tools)
Eclipse supports c++14, all you need to do is to add -std=c++1y in your prefrences->C/C++->Build->Settings->Discovery
for "CDT Cross GCC Built-in Compiler Setting" add "-std=c++1y" at the end of compiler specs.
You also set the dialects in your project setting to support c++14,
Go to your project setting->C/C++ Build->Settings->GCC C++ Compiler->Dialect and select -std=c++1y
I've been playing with Sublime Text 2 the last few days and was wondering if anyone out there has had any success getting Cocoa method completions working yet? Is there a plugin (or in-progress project to create one) out there?
Any general comments on using Objective-C in Chocolat or Sublime Text 2 would also be welcome.
There is an in-progress Sublime Text package that connects to clang to get autocomplete data called SublimeClang I've not managed to successfully get it to work totally with Cocoa/UIKit Dev, but here's a screenshot
and my options, that are a start
In MacVim I use a plugin called Cocoa.vim which haves useful python scripts that generates a classes and methods files for autocompletion. I didn't try so much with ST2, but may be is posible to create a sublime-package or sublime-completions file with all this data.
For the moment, I only create a sublime-completions file with some snippets. If I find a way to make this work, I will tell you.
I let my SublimeClang configuration options if helps anybody. I've already some of the autocompletions working:
"options":[
"-Wall",
"-isystem", "/Applications/XCode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk/usr/include/",
"-isystem", "/Applications/XCode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk/usr/include/c++/4.2.1/",
"-I/usr/lib/clang/3.1/include/**",
"-I", "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/llvm-gcc-4.2/lib/gcc/i686-apple-darwin11/4.2.1/include/",
"-arch","armv7",
"-isysroot", "/Applications/XCode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk",
"-D__IPHONE_OS_VERSION_MIN_REQUIRED=50000",
"-ferror-limit=0"
]
Answering my own question here. A quick visit to the Sublime forums didn't turn up any leads nor did Google. It looks as though method completions for Objective-C aren't currently part of the default install nor available via 3rd-party quite yet.
This user http://b.rthr.me/wp/?p=368 claims to have gotten SublimeClang working. I may report back myself once I try it...