Jump to content
7erra

[Tutorial] ArmA and Notepad++

Recommended Posts

Hello my fellow mission editors!

 

Since the Notepad++ Editor is so customizable why not customize it for ArmA?

 

I.) SQF Syntax Highlighting and Auto Completion

Obviously the most important improvement. Instructions can be found at the respective sites.

 

 

II.) BIKI search

Poseidon Tools already has it and Notepad++ can do it too: The instant jump to the BIKI (Bohemia Interacitve Wikipedia) with the selected command. Here are the steps to get it working:

  1. Go to "EDIT >> On Selection >> Change search engine"
  2. Select "Set your search engine here:"
  3. Paste the following into the blank field: https://community.bistudio.com/wiki/$(CURRENT_WORD)
  4. Close the dialog
  5. Now select a command and right click
  6. "Search on Internet" will take you to the command's BIKI site
  7. (Optional) Set a hotkey
    1. Go to "Settings >> Shortcut Mapper"
    2. Filter for "Search on Internet"
    3. Edit the entry by doubleclicking
    4. Select your preferred key/combination from the dropdown menu
    5. Press OK
    6. Close the overlay

 

III.) Open latest log

Since Notepad++ has a tail function you can use it to analyse you Arma log.

NOTE: This is a very very basic approach which I put together with my non-existent batch skills and exceptional Google skills.

  1. Create a file anywhere on your computer (eg in the Notepad++ directory)
  2. Rename the file and the file extension to eg "LatestLog.bat" (w/o the quotation marks)
  3. Edit it with Notepad++
  4. Paste the following lines into the file:
  5. FOR /f %%i IN ('dir "C:\Users\%USERNAME%\AppData\Local\Arma 3\*.rpt" /o:d /b') DO (set LAST=%%i)
    start notepad++ "C:\Users\%USERNAME%\AppData\Local\Arma 3\%LAST%"

     

  6. Save the file
  7. Go to "Run >> Run" or press F5
  8. Press the 3 dots
  9. Locate your .bat file and press "Open"
  10. Save with custom name
  11. The function can now be found under the "Run" menu as the last entry

 

IV.) Enable Tail

"Tailing" a file will make it scroll to the last line automatically. This is especially useful for logs which get updated frequently.

  1. Enable/Disable the tail functionality by...
    1. Clicking the "👁️" in the hotbar
    2. Going to "View >> Monitoring (tail -f)"
    3. (Global setting) Going to "Settings >> Preferences >> MISC. >> File Status Auto-Detection" and checking the "Scroll to last line after update" option

 

V.) Automatic File Updates

Normally Notepad++ will ask you if you want to reload a file that has been edited externally. This can and will get annoying especially with logs. Make it automatic with the following steps:

  1. Go to "Settings >> Preferences >> MISC. >> File Status Auto-Detection"
  2. Check the "Enable" and "Update silently" option

 

VI.) Plugins

There are hundreds of plugins so here is a list of some that I personally found useful or interesting.

Install Plugins:

  1. Before doing anything: Save unsaved files! Notepad++ will be restarted during the process
  2. Go to "Plugins >> Plugin Manager >> Show Plugin Manager"
  3. Select the "Available" tab
  4. Wait for the list to refresh (might take a minute or two)
  5. When selecting an entry the description will be displayed in the text field below the browser
  6. Check the boxes for plugins that you need and press "Install"
  7. After the download finished restart Notepad++
  8. The plugin(s) can be found under the "Plugins" dropdown menu

 

List of useful plugins:

  • Don Rowlett Color Picker
    • Does as the name says: It has a UI where you can set the desired color and converts it to different formats. The most useful output is the HTML format which is used in Structured Text.  The RGB format sadly isn't the same as A3 (0-255 instead of 0-1). 
  • Quick Color Picker +
    • Another color palet. But with additional functionalities: Select a color from your screen, edit/preview already written down colors
  • MathPad
    • A simple calculator. If you want to evaluate an expression without switching to another program.
  • MultiClipboard
    • Store your copy/paste history and access it with CTRL+SHIFT+V. Getting your PhD has never been easier.
  • Falling Blocks
    • Need some distraction from getting angry/sad at not working scripts?

And more to follow.

 

 

Feel free to share your own tips and tricks as well as thoughts and questions!

 

7erra

Edited by 7erra
removed armaholic link, changed dead link
  • Like 5
  • Thanks 5

Share this post


Link to post
Share on other sites

Good stuff, thanks for sharing 7erra.

Unfortunately my notepad++ is bit messed up as the syntax highlighter often fails when I'm editing arma files. I have thread about that in here

is notepad++ working well for every one?

Share this post


Link to post
Share on other sites
3 hours ago, 7erra said:

FOR /f %%i IN ('dir "C:\Users\%USERNAME%\AppData\Local\Arma 3\*.rpt" /o:-d /b') DO (set LAST=%%i goto stop)

:stop

start notepad++ "C:\Users\%USERNAME%\AppData\Local\Arma 3\%LAST%"

FOR /f %%i IN ('dir "C:\Users\%USERNAME%\AppData\Local\Arma 3\*.rpt" /o:d /b') DO (set LAST=%%i)
start notepad++ "C:\Users\%USERNAME%\AppData\Local\Arma 3\%LAST%"

/o:d not /o:-d. You want the last file found to be the newest. No need for the goto and label, flow will automatically go to the next line.

Share this post


Link to post
Share on other sites
1 hour ago, gc8 said:

Unfortunately my notepad++ is bit messed up as the syntax highlighter often fails when I'm editing arma files. I have thread about that in here

is notepad++ working well for every one?

Well up until now I was using Poseidon tools as my sqf editor. But I think I'll go back to Notepad++ bc Poseidon has this "Buy license" dialog that pops up after saving a certain amount of times. Otherwise it's working fine for me. From where did you download the highlighter?

 

@Larrow Code adjusted, thanks 👍

Share this post


Link to post
Share on other sites
12 hours ago, 7erra said:

From where did you download the highlighter?

 

Can't remember, maybe made it my self just took command list from somewhere. I uploaded the xml here if some one wants to take a look

Share this post


Link to post
Share on other sites

It's not the language definition that's buggy because I downloaded the lang def from 7erras post and still my notepad++ gets messy and I have restart it

Share this post


Link to post
Share on other sites

I'll continue the discussion on your post 😉 

Share this post


Link to post
Share on other sites

Thanks for this 7erra,

 I use notepad++ and found this very helpful

Share this post


Link to post
Share on other sites

Links for SQF Syntax Highlighting and Auto Completion and dead, does anyone have them?

On 3/2/2019 at 10:35 AM, 7erra said:

I.) SQF Syntax Highlighting and Auto Completion

Obviously the most important improvement. Instructions can be found at the respective sites.

http://www.armaholic.com/page.php?id=8680

https://github.com/Sanjo/npp-sqf

 

Does anyone have updated links?

Share this post


Link to post
Share on other sites
2 hours ago, Nuxes said:

Links for SQF Syntax Highlighting and Auto Completion and dead, does anyone have them? 

Does anyone have updated links? 

On the last page there should be latest version of sqf auto completion and highlighting.

  • Thanks 1
  • Haha 1

Share this post


Link to post
Share on other sites

There's always GossamerSolid's version, which is being kept up-to-date by @Janez

 

And the Armaholic link won't ever be fixed because Armaholic is gone.

  • Thanks 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×