1. 2017-04-24 - Find and Replace in Path with IntelliJ; Tags: Find and Replace in Path with IntelliJ

    Find and Replace in Path with IntelliJ

    Since I have a bunch of generated html filed from my WordPress migration to Jekyll, I needed to replace some values in all generated files. IntelliJ has powerful search and replace capabilities.

    First select the value you need to replace and enter the substitution in the assistant. Choose the base path, for the replacements.

    IntelliJ Assistant

    After you executed the search, IntelliJ requests the scope of the action. Replace all files are perfect.

    Replace Action

    For more options take a look at the IntelliJ Help.

  2. 2017-04-24 - Create file templates for Jekyll posts; Tags: Create file templates for Jekyll posts

    Create file templates for Jekyll posts

    Writing Jekyll posts always require a YAML front matter block content. To speed up the task you may create a file template for IntelliJ or Webstorm, depending which IDE from Jetbrains you are using. The procedure is equal.

    First create a new file template.

    Create new file template

    In this template you can use the internal variables provided by the IDEA platform. The author and date using variables as default values. The title is requested.

    This is my template content. Adjust it to your needs.

    layout: post
    status: publish
    published: true
    title: $title
    author: ${USER}
    date: '${DATE} ${TIME}'
    categories: []
    tags: []
    comments: []

    Pay attention in which scope (default and project)the template exists.

    Jekyll Post template

    After that you just create a new file and input the requested information.

    Create new Jekyll post

  3. 2015-09-11 - Copy text from IntelliJ in another theme; Tags: Copy text from IntelliJ in another theme

    Copy text from IntelliJ in another theme

    IntelliJ allows you to use the Darcula theme, that is in some case better, e.g. coding on a notebook to save power. It may be the taste, that this theme is desired. If you copy and paste code from IntelliJ it will be formatted with the Darcula theme. If you want a printer friendly theme, you can set the option for copying, to use another theme like Default.

  4. 2015-08-22 - IntelliJ Regular Expression editor support; Tags: IntelliJ Regular Expression editor support

    IntelliJ Regular Expression editor support

    IntelliJ has the capability to use regular expressions to find and replace text source. This powerful feature simplifies your life.

    In this example text from a CLI console is taken:

    > mbeans 'jboss.as:subsystem=transactions' select *
      jdbcCommunicationStoreDropTable: false
      relativeTo: jboss.server.data.dir
      processIdUuid: true
      numberOfNestedTransactions: 0
      socketBinding: txn-recovery-environment
      numberOfTimedOutTransactions: 0
      jts: false
      numberOfTransactions: 569
      objectStorePath: tx-object-store
      jdbcActionStoreDropTable: false
      path: var
      numberOfHeuristics: 21
      numberOfCommittedTransactions: 544
      processIdSocketBinding: null
      defaultTimeout: 300
      useJdbcStore: false
      numberOfAbortedTransactions: 25
      jdbcStateStoreTablePrefix: null
      processIdSocketMaxPorts: 10
      jdbcActionStoreTablePrefix: null
      useHornetqStore: false
      hornetqStoreEnableAsyncIo: false
      jdbcStateStoreDropTable: false
      numberOfInflightTransactions: 0
      recoveryListener: false
      jdbcStoreDatasource: null
      statusSocketBinding: txn-status-manager
      jdbcCommunicationStoreTablePrefix: null
      numberOfApplicationRollbacks: 25
      nodeIdentifier: 1
      enableTsmStatus: false
      objectStoreRelativeTo: jboss.server.data.dir
      enableStatistics: true
      numberOfResourceRollbacks: 0

    To use the fields values in an XML config file, simply paste the content and the regex does the matching for you. The pattern detects the values with the new line and replaces them with the comma separator.

  5. 2015-06-22 - IntelliJ Apache configuration support; Tags: IntelliJ Apache configuration support

    IntelliJ Apache configuration support

    If you use IntelliJ or any other IDEA product and have to deal with Apache configurations like .htaccess files, the following plugin might interest you. It supports syntax auto-completing and high-lightning.