Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Are there complete themes for Visualforce and/or Apex for Notepad++? Ideally with autocomplete for all parameters and methods and code highlighter? I made custom a theme for Visualforce only but without parameter identification so it is not completely useful. I use Notepad++ quite often in my work and it would be very helpful.

I think Notepad++ is the best solution (for me) between Eclipse (too slow when saving) and in-browser editor (unreliable but fast).

share|improve this question
    
what OS are you using? – Phil B Feb 19 '13 at 15:08
    
@turbo2oh i'm on PC :) – Sergey Utko Feb 19 '13 at 15:16
2  
see also BrainEngine Studio and BrainEngine Next for a couple other alternatives – bigassforce Feb 19 '13 at 16:04
2  
An alternative to the 'slow while saving' in Eclipse is disable the Automatic Build feature, which is the task perceived as slow during a save. It can be disabled at the workspace or project level. At that point you get the benefit of working in Eclipse with the schema available to you and can save (locally) quickly and as frequently as you see fit. When you are ready to build and deploy your local saves to SFDC, you can execute the builder via ctrl-B or the 'Build All' item on the Project menu. This does not make the remote save quicker, but you get control when the build action occurs. – Mark Pond Feb 19 '13 at 17:28
    
@MarkPond Hey Mark, thank you for the answer. I will try that too. – Sergey Utko Feb 20 '13 at 8:37
up vote 10 down vote accepted

The only combination I'm aware of at the moment for a text editor is Sublime Text 2 and Maven's Mate.

Sublime Text 2 is cross-platfrom (as opposed to TextMate which is Mac only), super fast, and has a lot of really fantastic text productivity features, such as multi-line editing.

Maven's Mate gives you some of the major features Eclipse, such as deploying to the server when you save, and some initial auto-complete. It's still got a ways to go, but the deploy to server on save has been enough to make the switch for me. Note that Maven's Mate doesn't officially support Windows, but has a pull request which provides an alpha version.

Another alternative is to use Eclipse to manage pushing data back and forth to Salesforce and using Notepad++ (or any text editor) to edit the files. After you're done edit just go back to eclipse, right click the project, and select refresh (the eclipse refresh, not the force.com refresh from server). When you refresh the project the eclipse auto-build will automatically save it to the server. In practice I'll do the major refactors and editing in the text editor, and then correct typos in Eclipse since the save failures will link to the line number.

share|improve this answer
1  
Thanks for the answer. Just found a video about MavensMate as an alternative to the Force.com IDE. Looks good! youtube.com/watch?v=yKjpMbH6RG0 – Sergey Utko Feb 19 '13 at 15:49
    
@mast0r happy to help. If I've answered your question would you accept my answer? – Ralph Callaway Feb 19 '13 at 15:57
    
This is what I was thinking about as well, thats why I asked what OS you were using. @Ralph are you on windows? I'm curious how stable the pull request version is. – Phil B Feb 20 '13 at 14:38
    
I'm not, but looking at the original pull request it was a pretty small change (linux required a lot more tweaks). The tool is just a ruby on rails package, so in theory it should already be pretty stable cross platform. – Ralph Callaway Feb 21 '13 at 0:38

Do you plan on using Notepad++ to edit the code and then push it to the server with Ant scripts or something? I'm curious how you plan on getting the code back to the server. Also, what about the added benefit of the Schema Browser etc?

I'll be the first to admit that the IDE has its problems, but I've never found a better solution.

As a backup plan if there is nothing available, you may be able to build something custom with Notepad++ (I'm not sure if it supports extensions/addons) using the Tooling API.

share|improve this answer
1  
I edit a lot of classes / pages per day and use Notepad++ as an intermediate storage for my data (search and replace, TextFX tools, etc). And then put the code back into the browser editor and save it. This is much faster than working only in Eclipse or only in browser. And yes, in Eclipse i only use Schema Browser. This is the approach that I have developed through the years. – Sergey Utko Feb 19 '13 at 15:16
1  
Interesting approach to it. If it works for you, awesome! Hopefully someone knows of a good theme you can use. I come from a Java background so using Eclipse for me is second nature at this point. I know all of the shortcuts etc so that is just what I am used to. It made the transition to using the Force.com IDE extension much simpler. – Jesse Altman Feb 19 '13 at 15:27
1  
Yeah, that is it. I come from web developing, so Eclipse is not my friend so far. It is great to execute anonymous apex or browsing DB, but not working with visualforce or saving (just cant sitting and waiting for about 20 secs until the page/class is saved :) – Sergey Utko Feb 19 '13 at 15:31
    
I've used a combo technique with Eclipse and a text editor to some success. Create a project with your files in Eclipse, edit them in your favorite text editor, then return to eclipse, right click the project root and select refresh (not the force.com refresh), which will trigger a save to server action. – Ralph Callaway Feb 19 '13 at 15:52

I have just written a notepad++ theme RANDOM GENERATOR :DDD it runs in unity3d compiler at the moment but it can generate 1000ds of xml templates from one template which is faster than searching online and DLing them, you have to specify roughly the brightness of bg and fg and it will generate the random colors, you can change the code to add some random saturation and value on top of the base values which are the brightness darkness preferences. search online for random notepad theme gen. ill have it uploaded in unity forums in an hour or so.

It will gen new salesforce n++ themes because it takes previous themes and changes all the colors only. you can mod the code to change also the font, it just rewrites the colors on preexisting xml theme files.

For reference, here is code of the N++ random theme generator, run it in unity3 and change the file paths. If you run it in a loop of 100 it will make 100 themes every time.

        var darks = 0.2;
        var brights = 0.8;//  value
        var sat = 0.7; //  Saturation
        //  hue will be random
        var mediums = 0.35;

        var sourcexml :  String = "C:/Users/coomi patel/Documents/audiowave5/Assets/codes/Black board.xml";
        var savetopath : String = "C:/Users/coomi patel/Documents/audiowave5/Assets/codes/" ;   //these are both paths

        function Start(){

        lineChanger();

        }

            function lineChanger()
                {
                    var gobalDarkColor = RGBToHex(HSVtoRGB( Vector3( Random.value , sat , darks ) ) ) ;
                    var arrLine : String[] = File.ReadAllLines(sourcexml);

                    var globalCommentColor = RGBToHex(HSVtoRGB( Vector3( Random.value , sat , brights*.75 )  ) ); // make comments a bit less bright with a multiplier on the value

                    for(s in arrLine ){ //  All colors in this loop will be different except using global defined prior to loop

                        if ( s.Contains("WordsStyle") && !s.Contains("COMMENT")){// general random colors and a background color

                            var randomColor = RGBToHex(HSVtoRGB( Vector3( Random.value , sat , brights )  ) );
                            var pos = s.IndexOf( "bgColor=" ); 
                            s= s.Remove(pos+9, 6).Insert(pos+9, gobalDarkColor);
                             pos = s.IndexOf( "fgColor=" ); 

                            s= s.Remove(pos+9, 6).Insert(pos+9, randomColor);


                        }

                        if ( s.Contains("WordsStyle") && !s.Contains("COMMENT")){// general random all same comment colors. can be less bright



                        }
                        if ( s.Contains("WidgetStyle") && !s.Contains("Global")){// has to be same background as uniform background from wordstyles



                        }

                        if ( s.Contains("WidgetStyle") && !s.Contains("Global")){// general random all same comment colors can be les bright



                        }

                    }
                    File.WriteAllLines(savetopath+"ThemeGenV1_"+ Random.Range(0,60000).ToString() +".xml", arrLine);


            }


        function Hue( H: float ): Vector3
        {
            var R : float= Mathf.Abs(H * 6 - 3) - 1;
            var G : float= 2 - Mathf.Abs(H * 6 - 2);
            var B : float= 2 - Mathf.Abs(H * 6 - 4);
            return Vector3( Mathf.Clamp01(R),Mathf.Clamp01(G),Mathf.Clamp01(B) );
        }

        function HSVtoRGB( HSV: Vector3): Vector4
        {
            //return Vector4(((Hue(HSV.x) - 1) * HSV.y + 1) * HSV.z,1);
            var H = Hue(HSV.x) ;
             H= Vector3 (H.x-1, H.y-1, H.z-1)* HSV.y ;
             H= Vector3 (H.x + 1, H.y + 1, H.z + 1)* HSV.z;
             return Vector4(H.x, H.y, H.z,1);
                // return Vector4(Mathf.Floor(H.x*255), Mathf.Floor(H.y*255), Mathf.Floor(H.z*255),1);  
        }   

        function rgb2hex(C:Vector4):String{

            var rByte  = System.BitConverter.GetBytes(C.x * 256);
            var gByte = System.BitConverter.GetBytes(C.y * 256);
            var bByte = System.BitConverter.GetBytes(C.z * 256);

            var rgb :String = rByte.ToString() + gByte.ToString() + bByte.ToString();
        }


        function GetHex (decimal : int) {
            alpha = "0123456789ABCDEF8";
                //print("val " + decimal);
            out = "" + alpha[decimal];
            return out;
        };

        function HexToInt (hexChar : char) {
            var hex : String = "" + hexChar;
            switch (hex) {
                case "0": return 0;
                case "1": return 1;
                case "2": return 2;
                case "3": return 3;
                case "4": return 4;
                case "5": return 5;
                case "6": return 6;
                case "7": return 7;
                case "8": return 8;
                case "9": return 9;
                case "A": return 10;
                case "B": return 11;
                case "C": return 12;
                case "D": return 13;
                case "E": return 14;
                case "F": return 15;
            }
        };

        function RGBToHex (color : Color):String {
           red = color.r * 255;
           green = color.g * 255;
           blue = color.b * 255;

           a = GetHex(Mathf.Floor(red / 16));
           b = GetHex(Mathf.Round(red % 16));
           c = GetHex(Mathf.Floor(green / 16));
           d = GetHex(Mathf.Round(green % 16));
           e = GetHex(Mathf.Floor(blue / 16));
           f = GetHex(Mathf.Round(blue % 16));

           z = a + b + c + d + e + f;

           return z;
        };
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.