Code Monkey home page Code Monkey logo

basicpawn's Introduction

BasicPawn - SourcePawn Editor

BasicPawn is a very lightweight and basic SourcePawn Editor that uses dynamic Autocompletion and IntelliSense like any other IDE or Advanced Editor. It supports SourcePawn, Transitional SourcePawn and even AMX Mod X. BasicPawn also has some special features like the simple debugger to debug your plugins and the plugin system to create your own BasicPawn plugins.

Offical BasicPawn Website

Supported:

  • SourceMod (SourcePawn & Transitional SourcePawn)
  • AMX Mod X (Debugger not supported yet and some Pawn features are not supported)
  • Pawn (Not fully supported)

Features:

  • Simple Windows Forms UI
  • Dynamic autocompletion (Methods, Variables, Methodmaps, Enums etc.)
  • IntelliSense
  • Simple Debugger
  • Plugin System
  • Customizable Syntax
  • Light/Dark Theme
  • Unlimited custom Highlight colors
  • Customizable configs
  • Supports old and new SourcePawn syntax
  • Runs on Wine as well

See AlliedModders BasicPawn thread for more information.

Requirements

Some of the BasicPawn plugins require a newer .NET Framework version.

Last Supported SourcePawn Compiler

Due to major compiler changes, BasicPawn became incompatible with newer versions of the SourcePawn compiler. Any version above 1.11-git6724 will not work with BasicPawn until i fix the issue. Download the last supported compiler here: SourceMod 1.11-git6724

Plugins

Download: Click on 'Download'

Syntax Styles

Download: Right click on 'Raw' -> Save as...

Support us

Donate

Screenshots

basicpawn's People

Contributors

dragokas avatar gammacase avatar keplyx avatar luxluma avatar maxijabase avatar timocop avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

basicpawn's Issues

[Suggestion] Default folder for configs

Would be cool if you could set default path for any config, and if file was loaded under that path it will be automatically assigned to that config. Smth like Known Files tab but for folders, also would be cool if you could add multiple paths.

Per file configurations.

Hi,

Is it possible to have per file configurations? I mean I file file "x" that should have always this configuration "x", the file "y" of another project should be have always its configurations and so on.
So every time that I change project I dont have always to change the settings.

Format Code

Would be good if there was hotkeys (Ctrl+R for current tab and Ctrl+Shift+R for all tabs) for Format Code feature (and support for all content without need to select where to format).

Also there something strange (bug?) with autoclose feature. This works ALWAYS even if you do it inside variable name. I think that this should work only if there is no text around.

If you autocomplete function to fast, it may autocomplete wrong function

So I was just typing function name, and instead of what I wanted I got absolutely different function. Here's how it looks like:
qcyqpcfncj

As I can see that happens when you trying to autocomplete a bit to fast, before it find proper function, so it autocomplete function that was previously selected in autocomplete. I'm not sure if it's possible to fix, but would be nice if it's possible.

[Bug] [Linux] Can't save configs

I'm running Basic Pawn on Kubuntu 16.04, with Wine 2.6 (and .NET 4.5 installed)
I tried creating a custom config, with the manual setting, and only the include directory set:
selection_003

But when I hit apply, it does not get saved
selection_004
I found the config file, but it's empty...
selection_005

Any way to fix this?
I want to do this because I'm working inside a custom directory on my computer, with only custom includes, and I have a script for compiling. I can't use autocomplete (The only way I found was to have all the includes files in my custom directory)

I just started using your software and it is very helpful (the only IDE for source pawn really working on linux). If I find some new bugs, I'll post them here!

[Improvement] Keep Tab order

The start page is very useful and helps save time, however, when I open back my files, the tab order seems random.
spectacle m14680

Would it be possible to open back files in the same order they were closed? So if I have the main file in first, then the secondaries in a certain oder, would it be possible to keep that order when I open them back with the start page?
spectacle m14095

That's not a big deal, but I like to have my project organized

Suggestions!

Hi,

First I'd like to have autocomplete for the forwards I mean:

AutoCompleteForward

Second, I think would be nice to have the natives/forward syntax even in brackets:

AlwaysInfo

Third, Idk if it's possibile but would be nice to have the syntax of forwards Hooked with HookEvent (or SdkHook?, Reg*Cmd?):

AutoCompleteHook

Fourth, add the possibility to "separate a from the window":

TwoWindows

Fifth, make an auto-upload via FTP(/SFTP)

And last, make in the configs an option to set custom compiler options.
BTW, nice editor!

PS; I wrote wrong it's "autocomplete" not "autocompile".

Autocomplete does not see functions and properties for this keyword in methodmaps.

Here's code example:

methodmap Test < ArrayList
{
	public Test()
	{
		return view_as<Test>(new ArrayList());
	}
	
	property int TestProp
	{
		public get() {}
		public set(int v) {}
	}
	
	public void TestFunc2()
	{
		this.Push(2);
		this.TestProp = 0;
	}
	
	public void TestFunc1()
	{
		this.TestFunc2();
	}
}

Autocomplete does not see any functions or properties from that methodmap and also does not see that that methodmap is a child of ArrayList. So doing this. gives nothing in autocomplete.

Does not color numbers that has special symbols in it.

You can use _ in almost any number in sp (except after decimal point in floats), also there's octal and binary representation of a value you can use, here how it looks like:
image
As I've been told, _ symbol used just for readability, and it actually does nothing. o stands for octal, and b stands for binary and I see that you already included hex values and exponents for floats.
Also here that code in raw text (if you want to test it yourself):

	int testi = 1_000_000;
	testi = 0b010_1;
	testi = 0x0_0001;
	testi = 0o_040_01;
	float testf = 2.0___20e3;

Also here you can look yourself what symbols are used and how compiler interprets values as normal:
for binary: https://github.com/alliedmodders/sourcepawn/blob/7915dde93cab5f9ce0d2318e3e4578db3a712ab6/compiler/lexer.cpp#L510-L530
for octal: https://github.com/alliedmodders/sourcepawn/blob/7915dde93cab5f9ce0d2318e3e4578db3a712ab6/compiler/lexer.cpp#L540-L564
for normal decimal: https://github.com/alliedmodders/sourcepawn/blob/7915dde93cab5f9ce0d2318e3e4578db3a712ab6/compiler/lexer.cpp#L572-L590
for hex: https://github.com/alliedmodders/sourcepawn/blob/7915dde93cab5f9ce0d2318e3e4578db3a712ab6/compiler/lexer.cpp#L598-L626
and float: https://github.com/alliedmodders/sourcepawn/blob/7915dde93cab5f9ce0d2318e3e4578db3a712ab6/compiler/lexer.cpp#L643-L756

Separate auto completion for methods and forwards, and add methodmapped functions support

As for now, enabling Full autocompletion for methods enables autocompletion for both forwards and default functions, and having autocomplete for forwards are fine so you don't need to fill all it's params manually, but having autocomplete for default functions is just annoying, as you need to erase all it's content and write values you want to pass each time. So my suggestion is to make 2 autocomplete options for default functions and forwards. Also add support for methodmapped functions to default functions autocompletion, like Menu.Menu() or Menu.SetTitle() as they aren't get autocompleted

Add Vertical Selection via Alt + {Mouse Select}

As in Visual Studio or NP++, you can select and edit columns via Holding down the Alt key and pressing the mouse button while moving in a vertical fashion.

Here's gif example (not mine):
27159725-8601413a-512c-11e7-85d6-fdb082e53e2c

[BETA] Feedback + Ideas

Using build from 1ed2266

The project system is awesome! Took me time to understand you actually have to open the project tab and add your files, but it's very useful.

I really like the fact that your last opened project will stay when you reopen the software, but one thing
that would be even better is to have the project files opened when you start BasicPawn.

I thought about some stuff you could do to improve this system:

  • Maybe on the start page, have 2 tabs:

    • last opened projects, where you can select and directly open projects
    • last opened files, the one currently in the start page
  • When you click on the project file, have BasicPawn open it? Currently it's just my text editor opening it.

  • Add an updater: A button like the "check update" one, but which actually downloads and installs the new update.
    I could probably write a bash script, but it would only wok on linux and it's less use-friendly than a simple button.

Bugs: Cannot open BasicPawn & Issues with configs

Hi,

When I try to open BasicPawn, sometimes the windows just appear in the taskbar but I cannot open the window. So I have to close it and delete the windowinfo.ini file.
To workaround this I've made this batch file...

del windowinfo.ini
start BasicPawn.exe

Also even if I've set a configuration as main, it wouldn't be applied automatically to all the new files.

basicpawnbug1 (Sorry for the typo)

"Enum structs" and "enum" color question

Shouldn't they be blue color like methodmaps are? That question related more to VisualStudio2017_Dark style theme, don't know where else to ask that question since that style in that repo.

Didn't ask if I want to save unsaved files on update

BasicPawn didn't ask if I want to save my unsaved files when clicking "Update and Exit" button in update window, it just closes BasicPawn and all files left unsaved. I understand that this is may sound dumb cuz I'm clicking "Update and Exit" but I think it still should ask if I want to save my files or not.

Don't shift one-line functions

Autoformat always shifts one-line ( without { } ) functions (and not only functions, can be also inside loops). Would be better if autoformat will not touch it.
eb

And some from GitHub:
eb

Search requests

Would be good if search had ability to work with selected text (option like a check-box) as in Notepad++. You can also do a quick search/replace by holding Enter without having to press Search/Replace every time. You can also make search window translucent when text was found and highlighted.

Setting default path that is inside another default path results in error

Got that error:

System.FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument list.
in System.Text.StringBuilder.AppendFormat(IFormatProvider provider, String format, Object[] args)
in BasicPawn.FormSettings.FormSettings_FormClosing(Object sender, FormClosingEventArgs e)
in System.Windows.Forms.Form.CheckCloseDialog(Boolean closingOnly)

Was trying to set default config path for a config, that was inside folder that already specified as default for a different config. So basically I have default config and its path set to D:\somepathtoserverfolder\ServerFolder; and I have another config (basically for a different (1.10) sm compiler) and trying to set his default config path to smth like D:\somepathtoserverfolder\ServerFolder\csgo\addons\sourcemod\scripting\sm1.10 results in a error I sent above, and also trying to press Exit in that error window results in a lot of other errors.

Autocomplete preview suggestion

Would be good if autocomplete window could print code preview for any non-native methods/functions or properties (It could be toggleable from settings).
default

[BUG | WINE] Autocomplete with multi files plugin + file menu closing problem

  • The autocomplete does not seem to work on secondary files

Here I am in my plugin's main file, autocomplete is working fine
selection_012

But here, I'm in a secondary file, included in the main file, and autocomplete is missing.
selection_013

As you can see, the path to the include files is in the custom profile, which is active
selection_014

Do I need to do some extra steps to make it work or is it just because the include files are declared only in the main file?

  • File menu closing itself

This is not a big deal, but when I hover my mouse over an item in the File menu, it closes itself after 1 second.
selection_015

Also, I was wondering, would it be possible to port the software natively to Linux (without using wine)? I saw some posts here and there talking about .net being able to be cross platform. This would be a big difference between Basic Pawn and SPEdit (which cannot even work properly under wine). I would love to help, but I don't know much about .net.

[Feature Ideas] Some features I think would improve Basic Pawn

I used Basic pawn a bit, and it's very useful! But I found it was lacking some features. Maybe some are already implemented, but I just couldn't find them (in that case, sorry...)

  • Let the user change syntax highlighting, add more themes

This is good (from Eclipse):
selection_007

This has too much contrast:
selection_006

  • Close opened tabs

I don't want the starting file, and I opened a file twice, how can I close tabs?
selection_008

  • Open files from last instance on startup

When working with multiple files, having to re-open all files can become annoying.

  • Code formating

This is not very clear (current)

char sClassname[64];
GetEntityClassname(entity, sClassname, sizeof(sClassname));
if (StrContains(sClassname, "_projectile") != -1)
return Plugin_Stop;

This is better

char sClassname[64];
GetEntityClassname(entity, sClassname, sizeof(sClassname));
if (StrContains(sClassname, "_projectile") != -1)
          return Plugin_Stop;

This is all the ideas I got for now, hopefully you like them. Keep on the good work!

Struct (not enum struct) variables are marked with macros colors

Here's pic of how it looks like:
image
myinfo here has color of macros defines, but it's just a variable name (Am I right?) of type Plugin which is struct, that struct definition can be found in sourcemod.inc file. So I think that it should have white color like other variable names have(In vs2017 dark theme at least, not sure how it is in other styles).

Autocomplete color + start page

Back to complain even more! ;)

I'm using a custom theme and the inverted colors, but the autocomplete window (the one in the bottom-right corner) is impossible to read:

spectacle h14721

Would it be possible to change the font color to white for this window? I know I can use the popup one to read, but sometimes I need to scroll down the autocomplete.

Also, the start page is very useful, but even if I select which files I want to open, an unnamed file is created:
spectacle d14900

Would it be possible to only open the selected files with the start page?

By the way, I'm using wine 2.9 now (updates are coming super fast)

Add possibility to select text in "Information" tab

Right now you can't select text you want in Information tab, and sometimes when you want to copy error for example you need to open whole log in notepad and copy from there, which is annoying sometimes.
Is it possible to add way to select and then copy selected text in "Information" tab?
Or maybe another option here:
image
that will let you copy only one line, instead of copy all.

Freeze problem

Idk why but if you paste a lot of (11000+ in my case) lines of code, BasicPawn just freezes and not response for a few seconds. Scrolling large code also causes some lags.

Includes problem

Why BasicPawn doesn't include non-core includes like tf2.inc, tf2_stocks.inc, sdktools.inc, sdkhooks.inc and etc.?

I've set config to Manual and put include directory but tooltip doesn't popup for non-core SM natives.
Also all non-core includes doesn't displaying in Object Browser.

Features Suggestions

Hi, I thought of some features that could make the editor a little better:

  • It would be cool to have a Line Wrap option, because it is sometimes annoying to scroll horizontally when the window is smaller and some lines do not fit the screen.

  • An other useful option would be to automatically open project files when opening a project

And last, I wanted to report that the Document Minimap option is making the editor very slow with large files (when creating a new line, or switching files), at least when using BasicPawn under wine 2.0.4. It is impossible to use on files with over a 1000 lines.

A Bug + A Suggestion

There is a "commenting bug" that is caused by BasicPawn not recognizing the comment after a "compiler dictate" .

(You are going to understand better in the gif <,<)
commentbug

I'm wonder if it's possibile to add a feature that "auto indent" the bracket.

automaticindent

String removed if there's no autocompletion found.

Like for example if I start to write smth like blabla and there's nothing matches in autocompletion, using auto complete hotkey will remove entire string you wrote. That may annoy you when you miss one symbol in the function name and autocompletion fails to find anything, and just removes your whole string, so you need to rewrite it again. Make it so it does not remove your string if there's no matching autocompletion was found.

here's example of how it looks like:
vjqdxwrdle

Unable to change config if default path is used

I can't switch to another config if file that I'm working with is inside folder that is default for a different config. So here's an example: I have 2 configs A and B, A has default path set to D:\Folder\, and I have a file under that folder, so when I open it it sets it's config to A as it should, but if I wanted to switch it to a config B, I can't, it simply returns back to A after configs tab closes.
So is it possible to add some sort of overriding for that feature? So I can switch configs for files if I wanted to but other files in that folder will still respect that folder and use proper configs.

RegEx for Replace

RegEx doesn't work (bug?) for Replace textfield. Tried to put $1 (with Regular Expressions Mode) but all search text replaces to $1.

Example:

Search: String\:(.*)\[\]
Replace: char\[\] $1

Result:
replaced to char\[\] $1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.