Questions tagged [filetype-java]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
25
votes
2answers
2k views

Vim's syntax highlighting considers a lambda (->) in Java an error

I am using Vim to program in Java 8, and am having a problem with syntax highlighting. A new feature in Java 8 is lambda support, which resulted in the creation of the arrow operator: ->. Vim does ...
4
votes
1answer
138 views

errorformat for Java junit output

I am trying to get VIM to jump to the file listed in the error. So the following is the error. || 1) test01(ErrorTest0) || java.lang.NullPointerException || at Line.equals(Line.java:43) || at ...
3
votes
1answer
886 views

java completion

I am always having problems, this time with java auto completion. I try to use the installation mentioned here, so that I can use vim to do my android development. However, after the installation, on ...
3
votes
1answer
523 views

How can I highlight only the identifier of a function in Java?

I found this question on SO but it is not adequately answered there. I thought that re-posting it here would bring it to the attention of people with more specialized knowledge who can answer it ...
2
votes
0answers
15 views

custom syntax highlight doesn't match in parentheses

In a custom java syntax file (${HOME}/.vim/syntax/java.vim) I wrote syntax match CommonVar /ret/ highlight CommonVar cterm=bold with the intention display the word ret in bold. I tested it with this ...
1
vote
3answers
86 views

How to use macros or any other way to add @Column and turn the below code into snake_case from camelCase?

Say that I have a java class with these fields(included only few fields, but the idea is that there could many more fields). public class Entity { private String firstName; private String ...
1
vote
1answer
744 views

Syntax highlighting gone when using buffer

At work I usually keep only a few files in buffer, typically a Yang file, a Java file, and possibly something like a readme file. In such an environment, the Yang syntax highlighting does not work. ...
1
vote
0answers
11 views

How to disable this 'make text in clipboard into comment' feature with java file?

I am not sure why, but when I tried to create a new java file and paste some java code into it, vim turned them into comments and added additional indentation to the code. 16 // import com.myproject....
1
vote
0answers
27 views

]m moves to class definitions not method definitions inside nested classes

I am editing a java file. ]m takes me from one class to the next, instead of to the next method definition. How do I get it to take me between methods? Example: public class Baz { public class ...
1
vote
0answers
23 views

Java equivalent for vim-latex folds

Vim-Latex has a feature which folds the tex document into the respective environments e.g. sections,equations. Can I enable somthing similar for Java?