GithubHelp home page GithubHelp logo

devtools's People

Contributors

kubapod avatar masteranza 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

devtools's Issues

New action: LocalizeVariable

Incorporate:

<|"Label" -> "Localize variable", 
  "ShortKey" -> "l", 
  "Action" :> Catch @ Module[
      {initialCaretPosition, symbol, selection, nb=InputNotebook[], modified = False, SymbolNameQ}
    , SymbolNameQ = StringMatchQ[LetterCharacter~~(LetterCharacter|DigitCharacter|"$")...] 
    
    ; symbol = CurrentValue@"SelectionData"
    ; If[ !MatchQ[symbol, _String?SymbolNameQ], Throw @ $Failed]
    ; initialCaretPosition = "CharacterRange" /. FrontEndExecute@FrontEnd`UndocumentedGetSelectionPacket@nb
    ; While[
        True
      , If[selection===$Failed, Break[]]
      ; If[
          Not @ MatchQ[selection,RowBox[{"Module"|"With"|"Block"|"DynamicModule","[",___}]]
        , FrontEndExecute @ FrontEndToken[nb,"ExpandSelection"]
        ; selection = CurrentValue@"SelectionData"
        ; Continue[]
       ]
      ; SelectionMove[nb,Before,Word] (*before head*)
      ; SelectionMove[nb,After,Word,3] (*after  head[{ *)
      ; NotebookWrite[nb, symbol<>", "]
      ; modified=True
      ; Break[]
      ]
    ; SelectionMove[nb, Before, CellContents]
    ; SelectionMove[nb, Next, Character, First @ initialCaretPosition + StringLength[symbol<>", "]If[modified, 1 , 0]  ]  
    ; SelectionMove[nb, All, Character, #2-#& @@ initialCaretPosition]
  ]
  
|>

Uninstall

Hi Kuba - I'm trying to track down the source of a front end issue that causes MMA to be "not responding" for 5-10s at a time, and not being familiar with paclets and so on haven't been able to work out how to uninstall devtools and or MPM so I can eliminate them as causes. Can you advise? (I just dragged out the devtools package from the folder but Ctrl+1 still works, just doesn't find the devtools any more so I haven't achieved much yet) Thanks, Julian

PS I thought the front end issue might have been due to Eclipse, graphics drivers, ... but the issue persists even when not using Workbench in Eclipse and I've swapped around the graphics from internal CPU to external graphics card and back without resolving the issue...

Package template

Add basic package template for quick prototyping:

<|"Label" -> "Package",
"ShortKey" -> "p",
"Template" -> "
BeginPackage[\"`sel`<*FromCharacterCode[96]*>\"];

  Unprotect[\"<*FromCharacterCode[96]*>*\", \"<*FromCharacterCode[96]*>*<*FromCharacterCode[96]*>*\"];
  ClearAll[\"<*FromCharacterCode[96]*>*\", \"<*FromCharacterCode[96]*>*<*FromCharacterCode[96]*>*\"];


Begin[\"<*FromCharacterCode[96]*>Private<*FromCharacterCode[96]*>\"];



End[];

  Protect[\"<*FromCharacterCode[96]*>*\"];

EndPackage[];"
|>

Initial Feedback

Ctrl+1... letter key: breaks if one takes it literally and enters e.g. Shift+N to get indicate capital letter; should handle upper & lower case letters the same?

More generally, I have used the New Function template a couple of times, but it's not to my specific personal prefs and I can't find where the template is - because I'm still ignorant about many internals; however, if an edit command could be added to the menu that would solve it. I did try CodeTemplatesEdit[] but without the example of new function to work from I couldn't do it - and I would be overloading rather than replacing the template if I used the same key, so again direct access to the default templates would be desirable.

Thanks for the opportunity to make a minor contribution - Julian

Disable both toolbars.

I really like the stylesheet, but I can't get those two rather obnoxious toolbars disabled. How can I do that?

Rename/Localize

Allow selection to be one expansion from wrapping the symbol to consider it valid.

Currently it only works if the given symbol is selected.

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.