mirror of
https://github.com/chylex/IntelliJ-IdeaVim.git
synced 2025-03-04 21:32:52 +01:00
Show "create ~/.ideavimrc" if this file is missing
This commit is contained in:
parent
341f1e915f
commit
35ab292c9f
@ -224,8 +224,7 @@ class NotificationService(private val project: Project?) {
|
||||
}
|
||||
|
||||
@Suppress("DialogTitleCapitalization")
|
||||
class OpenIdeaVimRcAction(private val notification: Notification?) :
|
||||
DumbAwareAction("Open ~/.ideavimrc")/*, LightEditCompatible*/ {
|
||||
class OpenIdeaVimRcAction(private val notification: Notification?) : DumbAwareAction()/*, LightEditCompatible*/ {
|
||||
override fun actionPerformed(e: AnActionEvent) {
|
||||
val eventProject = e.project
|
||||
if (eventProject != null) {
|
||||
@ -242,6 +241,12 @@ class NotificationService(private val project: Project?) {
|
||||
eventProject
|
||||
)
|
||||
}
|
||||
|
||||
override fun update(e: AnActionEvent) {
|
||||
super.update(e)
|
||||
val actionText = if (VimScriptParser.findIdeaVimRc() != null) "Open ~/.ideavimrc" else "Create ~/.ideavimrc"
|
||||
e.presentation.text = actionText
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("DialogTitleCapitalization")
|
||||
|
Loading…
Reference in New Issue
Block a user