Recent Posts

Pages: 1 [2] 3 4 ... 10
11
SlickEdit® / YAML and jinja
« Last post by garion911 on May 25, 2018, 07:54:49 pm »
Hi all.. I've been working with YAML and jinja for a bit now. I've come up with a basic YAML and jinja config that at least does *some* syntax highlighting.

YAML is the base language, and allows jinja to be embedded. (a common env for Salt at least).

The biggest hurdle I had, was getting to recognize jinja as an embed language properly. I ended up doing some regex with lookahead.. So in the YAML file, the search for jinja looks like {(?=[#%{]) and (?=[#%}])}. Then in the jinja area, I only really look for (begin) # and  (end) # for comments.. Then I have some other definitions to highlight if, endif, else, etc.. its not complete, but I believe its a reasonable start.

I think we need better support for templating languages in SE. Have a section where we could define templating languages (like application or scripting languages), and then in each language, have a section for 'allowed templating languages' or something. It would also be nice to not have to do the lookahead on the regex's to determine if we're in one.

Anyways, I attached my exported jinja and yaml settings for everyone.
12
SlickEdit® / Re: Configuring mingw project in v22.0.2.1
« Last post by bremenpl on May 25, 2018, 07:52:31 pm »
I am not sure I can fit anything more in the PATH. If you look at my makefile, I have modified the MAKE variable, but that didnt change the make path. Could you tell me where I can xhange it for the project or whole slickedit?
13
SlickEdit® / Re: Configuring mingw project in v22.0.2.1
« Last post by Dennis on May 25, 2018, 07:14:17 pm »
Ah, that finally clears things up.

You probably need to add the msys/1.0/bin path to your workspace PATH environment, or you could add that as a project open command, or you could just change to project tool for Build to use the fully qualified path to that make.

The make in your embedded toolkit directory probably did not understand MingW style paths (and possible not Windows style paths either).  There's a pretty good chance that all it understands is Cygwin paths.
14
SlickEdit® / Re: Configuring mingw project in v22.0.2.1
« Last post by bremenpl on May 25, 2018, 06:51:27 pm »
Ok... I am sorry I have wasted your time. My global PATH make != C:\MinGW\msys\1.0\bin\make.exe. The global make is from Code sourcery ARM package. Personally I think it should still work but whatever...

This doesnt fully solve my problem. If I run this mingw make manually with slickedit make file, it works:
Code: [Select]
k:\test>C:\MinGW\msys\1.0\bin\make.exe -f test.mak
C:/MinGW/bin/gcc.exe -c   -O0 -g3 -ggdb -p -pg -o "Debug/test.o"  test.c
C:/MinGW/bin/gcc.exe  -O0 -g3 -ggdb -p -pg -o "Debug/test.exe" Debug/test.o

But When I press build in slickedit, it doesnt:
Code: [Select]
K: & cd K:\test

K:\test>echo VSLICKERRORPATH="K:\test"
VSLICKERRORPATH="K:\test"

K:\test>"C:\Program Files\SlickEdit Pro 22.0.2\win\vsbuild" -signal 49541 -command make -f "K:\test\test.mak" CFG=Debug
 VSLICKERRORPATH="K:\test"
make -f K:\test\test.mak CFG=Debug
C:/MinGW/bin/gcc.exe -c -O0 -g3 -ggdb -p -pg -o "Debug/test.o"  test.c
make: *** [Debug/test.o] Error 1

K:\test>

This is the current makefile:
Code: [Select]
# SlickEdit generated file.  Do not edit this file except in designated areas.

# Make command to use for dependencies
MAKE=C:\MinGW\msys\1.0\bin\make.exe
RM=rm
MKDIR=mkdir

# -----Begin user-editable area-----

# -----End user-editable area-----

# If no configuration is specified, "Debug" will be used
ifndef CFG
CFG=Debug
endif

#
# Configuration: Debug
#
ifeq "$(CFG)" "Debug"
OUTDIR=Debug
OUTFILE=$(OUTDIR)/test.exe
CFG_INC=
CFG_LIB=
CFG_OBJ=
COMMON_OBJ=$(OUTDIR)/test.o
OBJ=$(COMMON_OBJ) $(CFG_OBJ)
ALL_OBJ=$(OUTDIR)/test.o

COMPILE=C:/MinGW/bin/gcc.exe -c -O0 -g3 -ggdb -p -pg -o "$(OUTDIR)/$(*F).o" $(CFG_INC) $<
LINK=C:/MinGW/bin/gcc.exe -O0 -g3 -ggdb -p -pg -o "$(OUTFILE)" $(ALL_OBJ)
COMPILE_ADA=gnat -g -c -o "$(OUTDIR)/$(*F).o" "$<"
COMPILE_ADB=gnat -g -c -o "$(OUTDIR)/$(*F).o" "$<"
COMPILE_F=gfortran -c -g -o "$(OUTDIR)/$(*F).o" "$<"
COMPILE_F90=gfortran -c -g -o "$(OUTDIR)/$(*F).o" "$<"
COMPILE_D=gdc -c -g -o "$(OUTDIR)/$(*F).o" "$<"

# Pattern rules
$(OUTDIR)/%.o : %.c
$(COMPILE)

$(OUTDIR)/%.o : %.ada
$(COMPILE_ADA)

$(OUTDIR)/%.o : %.d
$(COMPILE_D)

$(OUTDIR)/%.o : %.adb
$(COMPILE_ADB)

$(OUTDIR)/%.o : %.f90
$(COMPILE_F90)

$(OUTDIR)/%.o : %.f
$(COMPILE_F)

# Build rules
all: $(OUTFILE)

$(OUTFILE): $(OUTDIR) $(OBJ)
$(LINK)

$(OUTDIR):
$(MKDIR) -p "$(OUTDIR)"

# Rebuild this project
rebuild: cleanall all

# Clean this project
clean:
$(RM) -f $(OUTFILE)
$(RM) -f $(OBJ)

# Clean this project and all dependencies
cleanall: clean
endif

#
# Configuration: Release
#
ifeq "$(CFG)" "Release"
OUTDIR=Release
OUTFILE=$(OUTDIR)/test.exe
CFG_INC=
CFG_LIB=
CFG_OBJ=
COMMON_OBJ=$(OUTDIR)/test.o
OBJ=$(COMMON_OBJ) $(CFG_OBJ)
ALL_OBJ=$(OUTDIR)/test.o

COMPILE=gcc -c   -o "$(OUTDIR)/$(*F).o" $(CFG_INC) $<
LINK=gcc  -o "$(OUTFILE)" $(ALL_OBJ)
COMPILE_ADA=gnat -O -c -o "$(OUTDIR)/$(*F).o" "$<"
COMPILE_ADB=gnat -O -c -o "$(OUTDIR)/$(*F).o" "$<"
COMPILE_F=gfortran -O -g -o "$(OUTDIR)/$(*F).o" "$<"
COMPILE_F90=gfortran -O -g -o "$(OUTDIR)/$(*F).o" "$<"
COMPILE_D=gdc -c -g -o "$(OUTDIR)/$(*F).o" "$<"

# Pattern rules
$(OUTDIR)/%.o : %.c
$(COMPILE)

$(OUTDIR)/%.o : %.ada
$(COMPILE_ADA)

$(OUTDIR)/%.o : %.d
$(COMPILE_D)

$(OUTDIR)/%.o : %.adb
$(COMPILE_ADB)

$(OUTDIR)/%.o : %.f90
$(COMPILE_F90)

$(OUTDIR)/%.o : %.f
$(COMPILE_F)

# Build rules
all: $(OUTFILE)

$(OUTFILE): $(OUTDIR) $(OBJ)
$(LINK)

$(OUTDIR):
$(MKDIR) -p "$(OUTDIR)"

# Rebuild this project
rebuild: cleanall all

# Clean this project
clean:
$(RM) -f $(OUTFILE)
$(RM) -f $(OBJ)

# Clean this project and all dependencies
cleanall: clean
endif

15
SlickEdit® / Re: Unable to do a Find In Files on word at cursor in child window
« Last post by jorick on May 25, 2018, 03:14:25 pm »
Rebooting didn't work.

In addition, floating windows and any files in them didn't get reloaded when I restarted SE.  All other files that were in the main SE window were loaded okay, though.  But the wrong project in the workspace was loaded.
16
SlickEdit® / Re: Window/file configuration not saved on crash
« Last post by Dennis on May 25, 2018, 02:42:50 pm »
Sorry to hear about the power failure and lost time.

A good feature to make user of in a case like this is the File > Backup History Browser...  It will show you which files you had saved recently, of course, that isn't all the files you might have been open at the time of the power failure, but it can be helpful for getting back to where you left off.
17
SlickEdit® / Re: Unable to do a Find In Files on word at cursor in child window
« Last post by jorick on May 25, 2018, 02:35:46 pm »
I just found I can't save the file either.  If I click on the Save File icon when focus is in the floating window, the focus immediately goes to a window in the main SE window and the file in the main window is saved but the file in the floating window isn't.  Fortunately I save on loss of focus so at least I can save it by clicking outside of SE.

Further experimenting shows that no matter what toolbar button or menu I use when the floating window is active, it causes the main SE window to be active with a buffer in that window receiving the button or menu command.

I'm going to try rebooting.
18
SlickEdit® / Re: Unable to do a Find In Files on word at cursor in child window
« Last post by jorick on May 25, 2018, 02:27:57 pm »
Main window is separated into three areas, each containing around 15 to 20 files.  At the far right is a docked Files window Buffers, Project, and Workspace tabs; with the Open and Class windows in tabs below it.

Find and Replace window is floating. 

Find in Files is invoked by a toolbar control.  The control command is find_in_files.  It's not bound to a key.
19
SlickEdit® / Re: Unable to do a Find In Files on word at cursor in child window
« Last post by Lee on May 25, 2018, 02:16:46 pm »
I cannot reproduce this issue.  When I invoke Find in Files,  I always get the word at cursor from the floating window.  What does your layout look like?  Is Find & Replace window docked or floating?  How are you invoking Find in Files (key-command, menu)?
20
SlickEdit® / Re: Configuring mingw project in v22.0.2.1
« Last post by Dennis on May 25, 2018, 02:15:23 pm »
I see you used the fully qualified path to msys/1.0/bin/make rather than just 'make', but I thought you had said you had the msys bin dir in your path already?

Does the other make (mingw32-make) work with your makefile?

Just to clarify, what is the result if you run msys/1.0.bin/make on the slickedit makefile ?

Also, try adding -v to the compile and link commands in the slickedit makefile.  This might give a better idea of what is failing with gcc.
Pages: 1 [2] 3 4 ... 10