This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Adds annotations to internalized input parameters for all components on the canvas. | |
using the format `X=Y`. Completely reversible via toggling the `enable` input. | |
Default enabled types are Boolean, Integer, Number, String, Interval, and Plane, | |
connect a Value List to the `types` input to enable others. | |
""" | |
from Grasshopper.Kernel import Types, Parameters, GH_Component | |
from Grasshopper.Kernel.Special import GH_ValueList, GH_ValueListItem, GH_ValueListMode | |
this = ghenv.Component |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If you want to return the file to a previous state, there are a number of ways to do this. | |
Option 1: | |
Right-click the file (in any view) and pick 'Log Selected'. This gives you a history just of that file. | |
Pick the commit in the list which represents the state at which you want the file to be returned to. So this would be the commit before the changes you wanted to reverse | |
Right-click this commit and select "Reset To Commit" | |
Note, you can also do this in the main log view (right-click the file in a commit and pick "Reset To Commit", but it's easier to find the commit you want when you use the file-specific log. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function! WordCount() | |
let currentmode = mode() | |
if !exists("g:lastmode_wc") | |
let g:lastmode_wc = currentmode | |
endif | |
" if we modify file, open a new buffer, be in visual ever, or switch modes | |
" since last run, we recompute. | |
if &modified || !exists("b:wordcount") || currentmode =~? '\c.*v' || currentmode != g:lastmode_wc | |
let g:lastmode_wc = currentmode | |
let l:old_position = getpos('.') |