Skip to content

Is there a way to have specific configuration according to the IDE (pycharm, intellij, clion...) #375

Closed Answered by lippfi
Nimamoh asked this question in Q&A
Discussion options

You must be logged in to vote

Hi! It's possible now in IdeaVim 1.8.0-eap.1 (https://github.com/JetBrains/ideavim#get-early-access), where has() function and &ide option were added.
Here is an example of .vimrc/.ideavimrc

" options and mappings that are supported by both Vim and IdeaVim
set nu
set relativenumber

let mapleader= " "

inoremap <expr> jk col(".") == 1 ? '<Esc>' : '<Esc><Right>'
nnoremap U <C-R>
nnoremap S :%s/

if has('ide')
  " mappings and options that exist only in IdeaVim
  map <leader>f <Action>(GotoFile)
  map <leader>g <Action>(FindInPath)
  map <leader>b <Action>(Switcher)

  set ideajoin " https://github.com/JetBrains/ideavim/wiki/%22ideajoin%22-examples 
  set ideastatusicon=gray " changes IdeaV…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Nimamoh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants